TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   MySQL & Databases (http://www.talkphp.com/mysql-databases/)
-   -   Update (http://www.talkphp.com/mysql-databases/2548-update.html)

subman 03-29-2008 04:14 PM

Update
 
Im having trouble updating a table...

The query

PHP Code:

$sql "UPDATE username password email accesslevel FROM users WHERE username = '$user' AND password = '$md5' AND email = '$email' AND accesslevel = '$access' LIMIT 1;";
    
$query mysql_query($sql) or die(mysql_error()); 


Any ideas?

Salathe 03-29-2008 04:17 PM

The column names need to be comma-separated: UPDATE username, password, email, accesslevel ...

subman 03-29-2008 04:21 PM

EDIT: Fixed it...
Thanks.


All times are GMT. The time now is 10:25 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0