From reading various scripts I have noticed there are many different styles of inserting information into a database.
For example here is one style:
mysql_query("INSERT INTO news (title, body) values ($title, $body)");
This is the way I have been doing it lately:
mysql_query("INSERT INTO news (title, body) values ('".$title."', '".$body."')");
// in case that's hard to read, i'm doing this: (' ".$title." ', etc...
Comments?
Is there anything wrong with the way I'm doing it?
Any big differences between the 2 styles listed?