Hi all,
I've encountered a problem I've never seen before. I am stumped! Any advice is appreciated. First off, here is my table description:
Next, here is my insert sql code:
Next, as I execute the query, for debugging, I echo out the sql statement to see all the values. This is the result of echoing the above sql statement:
The first number, the invoice number is what I want it to be. Its good. But when I check my table, there is an anomaly. Everything appears perfectly except for the invoice number. See what it's giving me below:
Could someone please help? I'd like to know where my error is, and what caused it, if possible. I've never seen this before!
Thanks for all your help folks!
![[cheers] [cheers] [cheers]](/data/assets/smilies/cheers.gif)
Cheers!
Laura
I've encountered a problem I've never seen before. I am stumped! Any advice is appreciated. First off, here is my table description:
Code:
+-----------------------+--------------+------+-----+
| Field | Type | Null | Key |
+-----------------------+--------------+------+-----+
| invoice_id | int(10) | | PRI |
| fname | varchar(32) | | |
| mname | varchar(32) | YES | |
| lname | varchar(32) | | |
| email | varchar(64) | | |
| ip_address | varchar(16) | | |
| transaction_date_time | datetime | | |
| original_ticket_qty | int(2) | | |
| current_ticket_qty | int(2) | | |
| original_total | int(7) | | |
| current_total | int(7) | | |
| paid | tinyint(4) | YES | |
| company | tinytext | YES | |
| other_queens_program | tinytext | YES | |
| program | tinytext | YES | |
| year | int(4) | YES | |
| special | text | YES | |
| phone | varchar(32) | YES | |
| method | tinyint(4) | YES | |
| notes | varchar(255) | YES | |
+-----------------------+--------------+------+-----+
Code:
$query = "insert into invoices values (
$this->invoice_id,
'$inv_fname',
'$inv_mname',
'$inv_lname',
'$inv_email',
'$this->ip_address',
'$this->transaction_date',
$this->ticket_qty,
$this->ticket_qty,
$this->total,
$this->total,
0,
'$inv_company',
'$inv_other',
'$inv_program',
$inv_year,
'$inv_special',
'$inv_phone',
$inv_method,
'$inv_notes'
)";
Code:
insert into invoices values insert into invoices values ( 9999483648, 'john',blah','doe','johndoe@whatever.ca','111.111.111.111','',1,1,1000,1000,0,'','','MBA',2004,'','',0, '3b03f02c7fc02047942ce0247ef5a571')
Code:
select invoice_id from invoices;
+------------+
| invoice_id |
+------------+
| 2147483647 |
+------------+
1 row in set (0.00 sec)
Thanks for all your help folks!
![[cheers] [cheers] [cheers]](/data/assets/smilies/cheers.gif)
Cheers!
Laura