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? 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]; Link to comment https://forums.phpfreaks.com/topic/82571-result-into-an-array/#findComment-419781 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.