Jump to content

Archived

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

Abaddon1979

A little help with arrays and mysql.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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?

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.