SQL delete query
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: SQL delete query
You may wish to look into reading a bit about database design.  In general, everything needs to have a primary key, and it's typically an autoincremented number (id).  Examples in MyBB: user ID (uid), thread ID (tid) etc.  Note that these IDs uniquely identify any user or thread object.

Your switch statement is better as it prevents the user from putting whatever they want in that query, although now you have voodoo numbers (eg, why 1 or 2?).

My Blog
10-24-2012 08:19 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
SQL delete query - mdb - 10-21-2012, 05:30 PM
RE: SQL delete query - ZiNgA BuRgA - 10-21-2012, 10:01 PM
RE: SQL delete query - mdb - 10-22-2012, 03:00 AM
RE: SQL delete query - ZiNgA BuRgA - 10-22-2012, 09:14 AM
RE: SQL delete query - mdb - 10-23-2012, 09:40 AM
RE: SQL delete query - ZiNgA BuRgA - 10-24-2012 08:19 AM
RE: SQL delete query - devid456 - 07-06-2013, 12:45 AM

 Standard Tools
Forum Jump: