dayk995 Posted December 20, 2007 Share Posted December 20, 2007 I have the following php code. <?php include("clsMySQL.php"); $x = new clsMySQL; $sSQL = " SELECT name FROM general.parts_vendors WHERE name LIKE '".$term."%' LIMIT 1; "; $result = $x->ExecuteQuery("general", $sSQL); return $result[0]; ?> i'm not sure exactly how to store all the results into a variable, if there's a way to do it, how could i store the results into an array? Quote Link to comment https://forums.phpfreaks.com/topic/82571-result-into-an-array/ Share on other sites More sharing options...
Barand Posted December 20, 2007 Share Posted December 20, 2007 $sSQL = " SELECT name FROM general.parts_vendors WHERE name LIKE '".$term."%' LIMIT 1; "; $result = $x->ExecuteQuery("general", $sSQL); $array = array(); while ($row = mysql_fetch_row($result)) $array[] = $row[0]; Quote Link to comment https://forums.phpfreaks.com/topic/82571-result-into-an-array/#findComment-419781 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.