Is there any way to use constants in mysql queries? I tried, but it couldn't work.
define("NAME","jane");
$data = mysql_fetch_object(mysql_query("select stuff from main where user=" . NAME));
echo $data->stuff;
should I forget about this and just use variables, or is there a way to use constants in queries correctly?
Thanks in advance.
define("NAME","jane");
$data = mysql_fetch_object(mysql_query("select stuff from main where user=" . NAME));
echo $data->stuff;
should I forget about this and just use variables, or is there a way to use constants in queries correctly?
Thanks in advance.