Reply to Re: $sql = "update products set smallpicname = $myfile .....????

Your name:

Reply:


Posted by Jim S. on 02/03/06 03:34

smallpicname is the field name in the table, and $myfile is the variable
that holds the value.
i tried your suggestion and it did not work. (sorry, any other ... what am i
doing wrong) i know everything is right since if i change $myfile with
\'hello\' the value get stored where it supposed to.

thanks again guys and gals
jim

"Jon" <jonra@netins.com> wrote in message
news:drtani$lg$1@news.netins.net...
> Try $sql = "UPDATE products SET smallpicname = '$myfile' WHERE id=37"; -
> you're missing the single quotes for string data (which I assume
> smallpicname is).
>
> To do the id=idvar it'd be "UPDATE products SET id=$idvar, smallpicname =
> '$myfile' WHERE id=37";
>
> "Jim S." <jim@yeah.com> wrote in message
> news:1hnEf.4743$Nv2.3807@newsread1.news.atl.earthlink.net...
>> hi, i have this
>> $sql = "update products set smallpicname = $myfile where id=37";
>> mysql_query($sql);
>> i want the value of $myfile to be in the $sql , but it is not doing it,
>> so
>> what am i doing wrong?
>> how can i put variables in the $sql statement so i can execute it with
>> mysql_query ???
>> since i want also to put .....id= $idvar please help
>>
>
>

[Back to original 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

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