Jump to content

Correctly Using SQL


MemphiS

Recommended Posts

Just wondering about a few things

 

mysql_query("SELECT test FROM table WHERE id = '1' LIMIT 1");

Should i place LIMIT 1 to clarify the query?

 

mysql_query("DELETE FROM table WHERE table.id = '1' LIMIT 1");

 

or should i simply go:

 

mysql_query("DELETE FROM table WHERE id = '1' LIMIT 1");

 

Thanks for your responces :P

 

Anything else that is "good" practice could you post aswell..

Link to comment
https://forums.phpfreaks.com/topic/57713-correctly-using-sql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.