You are here: Re: Syntax Problem « PHP Programming Language « IT news, forums, messages
Re: Syntax Problem

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация