Posted by Jon Slaughter on 05/09/07 20:51
"Call Me Tom" <nobody@devnull.spamcop.net> wrote in message
news:z7q0i.9619$pW5.3833@trnddc07...
>I have the following PHP/MySQL code segment
>
> $query2="UPDATE reports
> SET fsacars_rep_url = $url_new
> WHERE pilot_id = $pid";
>
> echo"$query2";
>
> $result2=mysql_query($query2) or die(mysql_error());
>
> The above code produces the following messages:
>
> The echo of the query shows:
> UPDATE reports SET fsacars_rep_url = http://69.72.192.154/
> ~caa/caa/logbooks/no_rept.txt WHERE pilot_id = 2
>
> When the query runs the following error message is generated:
> You have an error in your SQL syntax; check the manual that corresponds to
> your MySQL server version for the right syntax to use near
> '://69.72.192.154/~caa/caa/logbooks/no_rept.txt WHERE pilot_id = 2' at
> line
> 2
>
> What is the proper syntax?
>
I don't know but my guess is that you need to put ' ' on your variables,
$query2="UPDATE reports
> SET fsacars_rep_url = '$url_new'
> WHERE pilot_id = '$pid';";
Navigation:
[Reply to this message]
|