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



try this
$sql = "UPDATE products SET smallpicname='".$myfile."'.....";

Should work.

Cheers,
Ivan

Jim S. wrote:
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@xxxxxxxxxx> wrote in message
news:drtani$lg$1@xxxxxxxxxxxxxxxxxx
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@xxxxxxxx> wrote in message
news:1hnEf.4743$Nv2.3807@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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




.



Relevant Pages

  • Re: Q. Error when trying to do Dir, as stated from Access Help File.
    ... Thanks, Jim ... > Dim MyFile, MyPath, MyName ... ' Retrieve the first entry. ...
    (microsoft.public.access.formscoding)
  • Re: Losing Contacts in my Address Book
    ... Thanks for the suggestion, Jim. ... > Have you used the Address Book option to Find and addressee? ... > AB menu and see if they are in some other folder). ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: How Can I Tell if A File Modification is Complete?
    ... That's even easier then Jim. ... The modifications made and written out to a temporary file. ... original file is killed and the temporary file renamed to the original ... I'm trying to envision how your suggestion would work in this case. ...
    (microsoft.public.vb.general.discussion)
  • Re: nav menu placement different in IE/moz/opera
    ... Thanks Jim. ... Your suggestion lines up the nav menu, but it throws off the header spacing that I was looking for. ... and for its css editor. ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Address book not visible
    ... I tried the above suggestion of ... wab /a and that opened up my address book which is still blank. ... Mister Jim wrote: ... MS MVP-IE, Mail, Security, Windows Desktop Experience - since 2002 ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)