All i want to do is put a variable into a MYSQL DB field...
Posted: Sun Aug 01, 2004 4:12 am
I've got a table called email with two fields, emailname and useremail with one record inserted where emailname=1 and useremail = na@na.com
My current code, most of which probably isn't necessary:
produces the following error:
You have an error in your SQL syntax near '' at line 1
All I want to do is put the variable $f[mail] into the database field on the only record - how do i do this!? Many thanks in advance...
My current code, most of which probably isn't necessary:
Code: Select all
$r=mysql_query("SELECT useremail FROM email WHERE emailname=1") or die (mysql_error());
$f=mysql_fetch_array($r);
mysql_query("UPDATE email SET useremail=$fїmail]") or die (mysql_error());You have an error in your SQL syntax near '' at line 1
All I want to do is put the variable $f[mail] into the database field on the only record - how do i do this!? Many thanks in advance...