GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 29-Apr-2005, 01:09
Anasta Anasta is offline
New Member
 
Join Date: Apr 2005
Posts: 3
Anasta is on a distinguished road

update record


i 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  
Old 24-May-2005, 14:17
anjanesh anjanesh is offline
New Member
 
Join Date: Mar 2005
Location: Mumbai, India
Posts: 16
anjanesh is on a distinguished road
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 GIDBlogA Week in Kuwait by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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 09:43
How to delete record on browser close? shwathi MySQL / PHP Forum 2 30-Aug-2004 07:12
RE: A simple update and } problem Dagma20 MySQL / PHP Forum 3 27-Mar-2004 16:37
update set misunderstood MySQL / PHP Forum 8 29-Dec-2003 11:56
Google Update and DeepCrawl Alert JdS Search Engine Optimization Forum 24 16-Aug-2003 05:35

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:15.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.