RE: [phplib] php/mysql insert problem
| From: | Stewart Taylor | Date: | Thu, 01 Jun 2000 15:13:08 +0000 |
| Subject: | RE: [phplib] php/mysql insert problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-152@lists.php.net to get a copy of this message | ||
What is the database field type of the order_field?
Is it the correct size for the value your trying to assign?
-Stewart
-----Original Message-----
From: Syed Hussain [mailto:shussain@uk.oracle.com]
Sent: 01 June 2000 16:09
To: php
Subject: [phplib] php/mysql insert problem
Hello All
I am recent to PHP and Javascript and therefore have very little idea
what I'm doing. Can somebody please advise me on the following.
I have created an orders table and using the following statement to
insert into the database
$insert_sql = "INSERT INTO HD_ORDER_ITEMS
(
MENU_ID,
QUANTITY,
ORDER_ID
)
VALUES
("
. $open . $$l_menu_id . $close_open
. $$l_qty_id . $close_open
. $l_order_id . $close .
")";
My problem is that the value 127 is inserted into the database for
order_id instead of using the value for the variable. The values for the
other 2 variables insert data correctly. I have put trace statements
in before and after the insert statement and it shows correctly the
value of the variable, but it does not seem to insert that value. The
statements are not contained within a function, so I'm not sure if that
would make a difference.
Your help will be appreciated.
Regards