Jump to content

Archived

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

jhale1966

Do You HAVE To Split MySQL Querys Into 2 Lines?

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! :)

Share this post


Link to post
Share on other sites

i think it\'s easier debugging to split it, especially if you have a REALLY long query

Share this post


Link to post
Share on other sites

×

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.