3 ms·
Presumably though the where clause would be there if you are taking the user id from the request vars in order for the code to work at all?
by jiggy2011 14y ago
Presumably though the where clause would be there if you are taking the user id from the request vars in order for the code to work at all?
- jstanley 14y agoIf you build the query at runtime based on whichever arguments are available, it is quite easy for missing arguments to slip through to the inner query generator and end up with a blank where clause.
- jiggy2011 14y agoa blank where clause throws an error (in mySQL at least) as it should do. Or will the query generator respond to missing arguments by removing the where clause altogether? In which case that's some pretty nasty behaviour.
- scriby 14y agoDepends on the flavor of SQL. But also, might not be a totally missing where clause, but just an incomplete one.