Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
set multiple fields with query
Old 08-16-2008, 07:38 PM set multiple fields with query
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
What is wrong with this:

PHP Code:
mysql_query("UPDATE userdb SET pass='$pass' AND resset='' WHERE resset='$ref')"); 
I cant word my question well enough to find an answer on google.

thanks
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-16-2008, 07:41 PM Re: set multiple fields with query
SmartBomb's Avatar
Average Talker

Posts: 27
Name: Dave
Trades: 0
It should be..

mysql_query("UPDATE userdb SET pass='$pass', resset='' WHERE resset='$ref')");
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
SmartBomb is offline
Reply With Quote
View Public Profile
 
Old 08-16-2008, 07:48 PM Re: set multiple fields with query
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
aaa I knew I was doing something wrong, I remember being corrected on something similar not to long ago.

Ok thanks!
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
Old 08-16-2008, 08:01 PM Re: set multiple fields with query
SmartBomb's Avatar
Average Talker

Posts: 27
Name: Dave
Trades: 0
You have to use a comma to seperate fields on the left hand side of the WHERE clause, whereas 'AND' is used on the right hand side to seperate qualifiers.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
SmartBomb is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to set multiple fields with query
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13568 seconds with 12 queries