Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

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 Go to previous message
AJM is currently offline  AJM
Messages: 2347
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.


 
Read Message icon5.gif
Read Message
Read Message icon9.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: POPUP transaction probelm
Next Topic: can't get _cm_popupReturn to execute
Goto Forum:
  


Current Time: Fri Apr 26 08:19:38 EDT 2024

Total time taken to generate the page: 0.01011 seconds