Re: MYSQL insert problems
| From: | chris smith | Date: | Sat, 18 Oct 2008 01:08:24 +0000 |
| Subject: | Re: MYSQL insert problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-282062@lists.php.net to get a copy of this message | ||
On Sat, Oct 18, 2008 at 3:22 AM, Frank Stanovcak
<blindspotpro@comcast.net> wrote:
> I'm using the following code to try and do a simple insert query. However
> it won't insert the data into the table, and I get no error messages. What
> have I done wrong this time?
You will be getting an error.
echo mysql_error();
> DateShipped,Quantity, Cases, Pallets, Weight, FKUSShippedBy, BillofLading,)
Extra comma at the end of BillofLading.
Also you should really use mysql_real_escape_string for non-numeric
values, and at least check stuff like $_SESSION['quantity'] is a
number.
--
Postgresql & php tutorials
http://www.designmagick.com/