This is my first post so hello everybody.
I am relatively new to PHP/MySQL but understand the concepts. I am trying to do execute simple INSERT statement into a MySQL db. Here is the code:
$query = "INSERT INTO ".$tb_basket." (`$b_id`, `$p_id`, `$p_quantity`, `$b_session_id`, `$b_date`)
VALUES ('".$basket->get_b_session_id().date("Ymd")."', NULL, NULL, '".$basket->get_b_session_id()."', '".$date."' )";
$result = mysql_query($query) or die("Error: create_basket not completed")
;
which produces:
INSERT INTO tb_basket (`b_id`, `p_id`, `p_quantity`, `b_session_id`, `b_date`)
VALUES ('u9k0p8cp273cmgt3v35jmrra6720071214', NULL, NULL, 'u9k0p8cp273cmgt3v35jmrra67', '2007-12-14 13:57:11' )
If I enter the query through command line it works, using it through a browser produces the die message and inserts nothing.
Why is this?
Any help greatly appreciated,
Cheers
PPS Dev