Hi Peter,
Thanks for the suggestion, suggestion 3 works perfectly if I also switch
the order of the numbering as you suggest, because then I can do order by
priority desc, rand(), which returns the numbers first and then the 0's,
which is what I really wanted. Also, good point about adding
Rasmus,
Peter and I were discussing the use of .$myvar. vs quoted string {$myvar}
more quoted string in a separate thread.
Is there a performance or compatibility advantage to using the concatenated
version as you suggest in your message below?
I currently use the concatenated version in all
hi,
Maybe someone here can point me the way ...
I'm looking for a fast and easy to use flatfile database working with PHP.
The amount of stored data, the frequency and number of queries are really
massive so I'm hoping to be able to skip MySql and build this service with
some alternative
For massive amounts of data, you really want to use some type
of SQL database. Not only will you save time programming, but
massive server resources aswell since the disk doesn't have to parse
and seek a large flatfile everytime.
On Mon, 2002-11-18 at 09:15, Teemu Pentinsaari wrote:
hi,
Maybe
Hi
If you have a lot of queries then use a database.
If 'the frequency and number of queries are really
massive so ' is a typo I am still not sure it's worth the hassle
Peter
---
Excellence in internet and open source software
For one, I don't see how it would be beneficial to store large quantities
of data in a non-database type of format.
As far as reducing the overhead of using MySQL, there are many methods one
can use to reduce the number of queries to a database. For instance, if
you are worried about making many
I've read the other posts and agree with them wholeheartedly - sounds like
you actually should investigate using some sort of relational db, MySQL or
otherwise.
However, if there is some major reason you don't or can't use a relational
database, you may want to consider storing your flat files
Thanks for the clarification with the returns. I made the changes
however and it still doesn't work. This code comes pretty much straight
off the presses from http://www.onlamp.com/lpt/a/832
What I have is quite modified from what is on there as it is quite buggy
to begin with. Anyway, It
?php // I got this somewhere. It works.
// This code is released under the same license as PHP.
(http://www.php.net/license.html)
assert(get_cfg_var(session.save_handler) == user);
// Without save_handler being set to user, everything works fine until it calls the
write
In article 1EA7D3AE70ACD511BE6D006097A78C1E022BF9B8@USROCEXC, Richard
Hutchins [EMAIL PROTECTED] wrote:
I've read the other posts and agree with them wholeheartedly - sounds like
you actually should investigate using some sort of relational db, MySQL or
otherwise.
However, if there is some
When I use this, I get 12/31/69 as my date.
-Original Message-
From: Aaron Wolski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 13, 2002 4:04 PM
To: 'Edward Peloke'; 'Php-Db'
Subject: RE: [PHP-DB] date()
$date = date(m:d:y, $myrow[datefield]);
Will produce: 11:13:02
This works great :-) Thanks.
I'll write a letter to onlamp.com to get that misleading code off their
website (maybe it's PHP3 based?).
Perhaps this should be added to PEAR? It appears that this is the
proper repository for such things. I'll look into it although I would
be much obliged if
Ok..
I guess it depends on how your date is stored. I always use
unix_timestamps.
If you are too.. then the format I supplied should work as indicated.
Aaron
-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: November 18, 2002 2:19 PM
To: 'Php-Db'
Subject: RE:
Hi,
I have the following code, but it doesn't works. How can I insert a path
string into a MySql Varchar cell? The result is always FALSE, but if $path
is a normal string ($path ='demo') than it works fine.
What can I do? (I use WInXp, Apache, and Php4.2.2)
Thanks!
?php
$database=PH;
On Monday, November 18, 2002, at 01:10 PM, Alan Kelly wrote:
$path = 'c:\\demo\\' ;
$query = insert into PH_PHOTO (PHOTO_PATH) VALUES ('$path');
$result=mysql_query($query);
I would guess that the backslashes are being interpreted once by php
when the variable $path is interpolated into the
it is just a datetime field and the clients use a javascript calander to
pick the date, here is the exact date as it appears in the db.
2002-11-08 00:00:00
Eddie
-Original Message-
From: Aaron Wolski [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 2:05 PM
To: 'Edward Peloke';
You might also want to look into using addslashes($path), especially if
you're going to be accepting this path info from a text box.
http://www.php.net/manual/en/function.addslashes.php
-Original Message-
From: Steve Cayford [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002
Hmm.. I would get it into a unix_timestamp (unless someone can suggest a
reasoning for now doing so).
Select unix_timestamp(storedDate) as date FROM SomeTable where blah
blah
Should work like that?
Aaron
-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED]]
Sent: November
On Tuesday 19 November 2002 03:26, Aaron Wolski wrote:
Hmm.. I would get it into a unix_timestamp (unless someone can suggest a
reasoning for now doing so).
It really depends on where you want to manipulate the dates. If mostly from
within MySQL then store with DATE, DATETIME TIMESTAMP, if
you can use the mysql date function and format it as you're pulling it out
of MySql
select date(column_name, %m/%d/%Y) from table;
this will return it formatted like 11/18/2002 or there are other options.
http://www.mysql.com/doc/en/Date_and_time_functions.html
this seems to be whar you're
whooops. I meant DATE_FORMAT. Sorry.
Jeffrey_N_Dyke
I dont think TAMINO will do the JOB! Tamino is too slow compared to Mysql or
PosgreSql.
and you will need a lot of disk space if you use Tamino. By the way I know
this because we just migrate
from Tamino to Posgresql and MySql...(and 1 more thing JSP and Java are only
options you have if u use
Hi folks,
I'm thinking of integrating an existing Lotus Notes Database into PHP-pages
and found the following functions:
http://www.php.net/manual/en/ref.notes.php
Unfortunately they are not very well documentated. For example
notes_list_msgs
Hi,
Just wondering, which is the better method:
1. Using PHP sessions ($_SESSION['var'] = val;)
2. Using mySQL-based sessions (as described in this thread)
I know if you're using multiple servers, a DB-based session would be handy.
Any comments, anyone?
Adam
Dear All,
I have question, I have table (dynamic_store) and I want to reply
back while the table was add new data, of course no user to do but the
function will automatic reply will do it? how to check the table was add
or not? is it running like daemon CMIIW? are php have function
to check
On Mon, 18 Nov 2002, Adam Nelson wrote:
One thing I left out - I had to take out the $GLOBALS[acdb] part from
mysql_query. This doesn't work with my version of php (4.2.3) I guess.
Also, assert(!empty($SessionTableName)); didn't work, so I commented it
out.
Whoops, the $GLOBALS[acdb] was
Don't you also have to put quotes around localhost in mysql_connect?
Peter
On Mon, 18 Nov 2002, Alan Kelly wrote:
Hi,
I have the following code, but it doesn't works. How can I insert a path
string into a MySql Varchar cell? The result is always FALSE, but if $path
is a normal string
i'm currently building a traffic analysis application for a website. it is
my first time working on such a project, so i'm not even sure if this would
be the best way to do it all, but here it goes.
what i would like to do is count the number of hits that go to different
sections of the site. i
Not sure what the best answer is, but if you are going to have a table
that's mostly going to be inserted into, and rarely read, then don't
create any indexes or keys on it. When it comes time to search the
table, copy it to another table, create indexes, and search away.
Indexes slow down
I have question, I have table (dynamic_store) and I want to reply
back while the table was add new data, of course no user to do but the
function will automatic reply will do it? how to check the table was
add
or not? is it running like daemon CMIIW? are php have function
to check data?
do
John,
That is good advice. I wasn't aware of indexes/keys slowing down inserts.
Whats the best way to copy a table over to another table though?
-jon
-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 5:36 PM
To: 'Jonathan Narong'; [EMAIL
If you develop the habit of writing conditionals like this:
if (Victoria == $city)
instead of like this:
if ($city == Victoria)
Your compiler (interpreter in PHP's case) will catch the assignment
vs. comparison error for you, because assigning to $city is valid but
assigning to a constant
$encrypted_string = md5(base64_encode($var.'secret key'));
Pass the user name or password to $var and place text in to replace the
words 'secret key'.
-Original Message-
From: Aaron Wolski [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 15, 2002 8:45 AM
To: 'Jason Vincent'; [EMAIL
33 matches
Mail list logo