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
Try as I may, parse error why?
Old 12-18-2005, 02:29 PM Try as I may, parse error why?
Junior Talker

Posts: 2
Trades: 0
Hi
Gota line below that comes up with a Parse error, I would like anyone to check over, I can not see what I have got wrong, so all help will be appreciated...

UPDATE SELLING_users SET credit=4 WHERE id = $Seller['id'];

SELLING_users table exists and has one column of twelve called credit with a present value of 5 also $Seller['id'] is used earlier in the script OK....
Is there enough info in the line to select and enter the data into the required column, 'id'

Here is a line pre my line that does a query for column endemailmode which works ok, should I use more selective info for the $Seller ['id'] as this original line (not my script..that's why this line works..Hi) uses........

#// Check if the e-mail has to be sent or not
$emailmode = @mysql_result(@mysql_query("SELECT endemailmode FROM SELLING_users WHERE id='".$Seller['id']."'"),0,"endemailmode");
if($emailmode != 'one') return;

Cheers

John

Last edited by wudz; 12-18-2005 at 03:06 PM..
wudz is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-18-2005, 02:37 PM
Rufo's Avatar
Extreme Talker

Posts: 173
Trades: 0
Firstly, you should have backticks around the table and field names like so:
Code:
UPDATE `SELLING_users` SET `credit` = 4 WHERE `id` = $Seller['id'];
If this query is part of a PHP string, then you shouldn't have the inverted commas around the array key, either:
Code:
mysql_query("UPDATE `SELLING_users` SET `credit` = 4 WHERE `id` = $Seller[id];");
Rufo.
__________________

Please login or register to view this content. Registration is FREE
Rufo is offline
Reply With Quote
View Public Profile Visit Rufo's homepage!
 
Reply     « Reply to Try as I may, parse error why?
 

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.10006 seconds with 12 queries