![]() |
|
#1
|
|||
|
|||
update recordi am using this on log-in but cant get it to work for logout so it sets the value back to '0'
Any ideas $sql = mysql_query("UPDATE users SET online='1' WHERE username='$username' AND password='$password'"); |
|||
|
#2
|
|||
|
|||
|
UPDATE `users` and not just UPDATE users because users is a keyword in MySQL and here in your case its the name of a table. For that you need to pu it in ``. Infact its good practice to place all your tablenames within ``.
Note: ` is not '. ` is on key left of 1. |
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| update view from a for loop | Rabbit_May | MS Visual C++ / MFC Forum | 0 | 25-Mar-2005 10:43 |
| How to delete record on browser close? | shwathi | MySQL / PHP Forum | 2 | 30-Aug-2004 08:12 |
| RE: A simple update and } problem | Dagma20 | MySQL / PHP Forum | 3 | 27-Mar-2004 17:37 |
| update set | misunderstood | MySQL / PHP Forum | 8 | 29-Dec-2003 12:56 |
| Google Update and DeepCrawl Alert | JdS | Search Engine Optimization Forum | 24 | 16-Aug-2003 06:35 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The