Jump to content

Do You HAVE To Split MySQL Querys Into 2 Lines?


jhale1966

Recommended Posts

I was just wondering what the difference was between:

 

$query = \"SELECT * FROM [tablename] WHERE [whatever]=[whatever]\";

$result = mysql_query($query);

 

and

 

$result = mysql_query(\"SELECT * FROM [tablename] WHERE [whatever]=[whatever]\");

 

Is it just better programming practice to split them up? I\'m still very new to this and would like to start off on the right foot.

 

Thanks! :)

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.