Abaddon1979 Posted September 14, 2006 Share Posted September 14, 2006 I want to combine two mysql searches and combine them, then search.Now here is my current sql query and while loop.[code]$query="SELECT * from calendar where starttime LIKE '$eventid%' ORDER BY starttime";$result=mysql_query($query);while($dbstuff = mysql_fetch_array($result)){echo " Blah Blah Blah table stuff ".$dbstuff['starttime']."";}[/code]I know there is a way to sort the array. But how would add another sql statement and combine them into one array so I can sort them that way? Link to comment https://forums.phpfreaks.com/topic/20799-a-little-help-with-arrays-and-mysql/ Share on other sites More sharing options...
Abaddon1979 Posted September 14, 2006 Author Share Posted September 14, 2006 Could I just use something like this?[code]while($dbstuff = mysql_fetch_array($result, $2nd_result)){[/code]I could also use "array_combine" but how do I set the arrays outside of a while loop? Link to comment https://forums.phpfreaks.com/topic/20799-a-little-help-with-arrays-and-mysql/#findComment-92076 Share on other sites More sharing options...
Barand Posted September 15, 2006 Share Posted September 15, 2006 What exactly are you trying to do?What is the other sql statement? Link to comment https://forums.phpfreaks.com/topic/20799-a-little-help-with-arrays-and-mysql/#findComment-92105 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.