RSS Forums RSS
Please support our MySQL advertiser: Programming Forums
Views: 3922 | Replies: 10 | Thread Tools  Display Modes
Join Date: Mar 2007
Location: Israel
Posts: 16
Reputation: Shaffer is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
Shaffer Shaffer is offline Offline
Newbie Poster

Re: how to update a field in mysql with txt file.

  #11  
Oct 20th, 2007
Hello,
that is quite a really stupid error by me, and something too unfortunate to hold you back for.
Parse errors are a type of syntax errors. It told you that you have an unexpected '{'. This usually means that you didn't connect a string correctly ("Hello"."World"), or that you didn't close parenthasis correctly.
I made an "if" condition opening one clause ("(") and then a function, mysql_query, resulting in opening another clause ("("). Tha thing is, I only closed one (")") so that the curly brace ("{") was unexpected, instead of another closing parenthasis (")").

So, the correction is to be:
if(@mysql_query("UPDATE test_table SET ".$temp[1]."='".$temp[0]."';")) {

Good night!
Shaffer.
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:25 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC