User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 456,507 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,656 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 3544 | Replies: 10
Reply
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  
Reply

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

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

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 3:41 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC