Results 1 to 25 of 39
Apr 18, 2013, 23:02 #20
- Join Date
- Jul 2006
- Augusta, Georgia, United States
- 16 Post(s)
- 3 Thread(s)
That error means that there is no row in the table order_table with a column id containing the $value.
This can be confirmed by running the below query replacing the $value with the expected integer.
SELECT COUNT(*) ct FROM order_table WHERE id = $value
A single row should be returned with a value of 0.
Once that is confirmed the solution is to reference a row that does exist or create the row in that table.
It is good though that you are using a foreign key. Otherwise, you would essentially have an orphaned row in the order details table.The only code I hate more than my own is everyone else's.