it works fine on my xampp setup but will not work on my php standalone setup on another machine.
Expand|Select|Wrap|Line Numbers
- $var1 = "-1";
- $var2 = 7;
- $q="update `table1` set `fld1` = '$var1' where `fld2` = '$var2'";
- mysql_query($q);
it works if I type the sql straight into mysql query browser.
Expand|Select|Wrap|Line Numbers
- update `table1` set `fld1` = '-1' where `fld2` = '7';
Expand|Select|Wrap|Line Numbers
- $q="update `table1` set `fld1` = $var1 where `fld2` = $var2";
fld2 is INTEGER()
I thought php can convert strings into the appropriate data type if needed.
any ideas why its working on xampp and not on a php standalone install?
Thanks for any help!