> $sql = "INSERT INTO x VALUES ({$_SESSION['add']['name']} ";
>
> oh, and unless add & name are actually constants you should always wrap
> them in single quotes. (php will covert the non-exstent constant into a
> string a issue an E_NOTICE + its overhead)
well that got me on the right track..
user curly braces around your arrays in the string e.g:
$sql = "INSERT INTO x VALUES ({$_SESSION['add']['name']} ";
oh, and unless add & name are actually constants you should always wrap
them in single quotes. (php will covert the non-exstent constant into a
string a issue an E_NOTICE + its
Tuesday, April 6, 2004, 1:21:52 AM, you wrote:
> hi...
> i cant cut and paste my exact mysql query because it takes the ''
> stuff out doubles the $'s and the ,'s in the whole thing (dont know
> why but anyways...)...
> i have a query that goes something like this:
> mysql_query("insert into $Gue
hi...
i cant cut and paste my exact mysql query because it takes the '' stuff out doubles
the $'s and the ,'s in the whole thing (dont know why but anyways...)...
i have a query that goes something like this:
mysql_query("insert into $GuestbookTable values(NULL, '$_SESSION[add][date]',
'$_SESSIO
4 matches
Mail list logo