SV: [PHP-DB] Query construction (again)

2001-08-23 Thread Torgil Zechel
This should work: SELECT * FROM items WHERE TO_DAYS(NOW()) - TO_DAYS(submitDate) = 7; -Ursprungligt meddelande- Fran: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]For Russ Michell Skickat: den 23 augusti 2001 11:46 Till: Gremlins Mailing List Kopia: [EMAIL PROTECTED] Amne: Re:

SV: [PHP-DB] newbie having problem

2001-09-03 Thread Torgil Zechel
Check if mysql_query returns false. If it does (and im pretty sure it do), use mysql_error to check whats wrong... (Another way is to echo the query and paste it into the mysql command line client..) $result = mysql_query(...); if( $result == FALSE ) { echo mysql_error(); } I'm doing

SV: [PHP-DB] newbie needs to format time field

2001-09-03 Thread Torgil Zechel
Checkout: http://www.mysql.com/doc/D/a/Date_and_time_functions.html the function DATE_FORMAT(date,format) does what you want... -Ursprungligt meddelande- Från: Eric J Schwinder [mailto:[EMAIL PROTECTED]] Skickat: den 3 september 2001 21:39 Till: [EMAIL PROTECTED] Ämne: [PHP-DB]

SV: [PHP-DB] automatic logout

2001-09-10 Thread Torgil Zechel
As far as I know, the only way to get timeout of session data is to store a timestamp with last access time and check this each time the session data is referenced.. If the user close the browser window, the session data will timeout and you don't have to worry. -Ursprungligt

SV: [PHP-DB] Straightforward authentication?

2001-09-13 Thread Torgil Zechel
A common way to identify a client is to use the challange-response algorithm. It works like this: Ps is the password stored on the server Pc is the password entered by the client H is a hash-function (md5 for example) V is a 'random' value Server calculates H(V + Ps) and save this in a session