jhale1966 Posted July 1, 2003 Share Posted July 1, 2003 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! Link to comment https://forums.phpfreaks.com/topic/661-do-you-have-to-split-mysql-querys-into-2-lines/ Share on other sites More sharing options...
Arenium Posted July 2, 2003 Share Posted July 2, 2003 i think it\'s easier debugging to split it, especially if you have a REALLY long query Link to comment https://forums.phpfreaks.com/topic/661-do-you-have-to-split-mysql-querys-into-2-lines/#findComment-2192 Share on other sites More sharing options...
jhale1966 Posted July 2, 2003 Author Share Posted July 2, 2003 Gotcha! So it\'s best that I go ahead and keep doing it for consistancy. Link to comment https://forums.phpfreaks.com/topic/661-do-you-have-to-split-mysql-querys-into-2-lines/#findComment-2195 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.