Home » RADICORE development » Transaction Patterns » Delete2 deletes the wrong records... where's my error?
Re: Delete2 deletes the wrong records... where's my error? [message #1216 is a reply to message #1215] |
Thu, 10 January 2008 05:07  |
AJM
Messages: 2382 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Even though the order_id is passed down in the WHERE clause it has to be included in the list of selected column names so that it appears in $fieldarray. It is the contents of this array which is used to construct the list of primary keys for the selected records.
An SQL error will only be generated if there is a syntax error in the SQL statement, such as an unknown column or table name, or an unknown or missing keyword. Issuing a DELETE for a record which does not exist will not produce an error - it will simply report that zero rows were affected.
Whenever an SQL statement contains a WHERE clause it will only work on those records which actually match that clause, which may not be the same as those records which you think ought to match.
|
|
|
 |
 |
Delete2 deletes the wrong records... where's my error?
By: ikatz on Fri, 28 December 2007 18:05
|
 |
|
Re: Delete2 deletes the wrong records... where's my error?
By: AJM on Sat, 29 December 2007 04:48
|
 |
 |
Re: Delete2 deletes the wrong records... where's my error?
By: ikatz on Mon, 31 December 2007 12:50
|
 |
|
Re: Delete2 deletes the wrong records... where's my error?
By: AJM on Mon, 31 December 2007 13:31
|
 |
|
Re: Delete2 deletes the wrong records... where's my error?
By: ikatz on Wed, 02 January 2008 14:51
|
 |
|
Re: Delete2 deletes the wrong records... where's my error?
By: AJM on Wed, 02 January 2008 15:29
|
 |
|
Re: Delete2 deletes the wrong records... where's my error?
By: ikatz on Fri, 04 January 2008 17:33
|
 |
|
Re: Delete2 deletes the wrong records... where's my error?
By: AJM on Fri, 04 January 2008 18:01
|
 |
|
Re: Delete2 deletes the wrong records... where's my error?
By: ikatz on Wed, 09 January 2008 15:51
|
 |
|
Re: Delete2 deletes the wrong records... where's my error?
By: AJM on Wed, 09 January 2008 16:49
|
 |
|
Re: Delete2 deletes the wrong records... where's my error?
By: ikatz on Wed, 09 January 2008 20:05
|
 |
|
Re: Delete2 deletes the wrong records... where's my error?
By: AJM on Thu, 10 January 2008 05:07
|
Goto Forum:
Current Time: Fri Jul 11 10:37:18 EDT 2025
Total time taken to generate the page: 0.02137 seconds
|