Yes, I am aware this is a basic question, but I am learning PHP.
$sqlquery = "SELECT * FROM table WHERE data = " . trim($array[$elementnum]);
echo $sqlquery; //Returns correctly
$queryresult = mysql_query($sqlquery);
var_dump($queryresult); // returns false
mysql_fetch_row($queryresult); //Doesn't Work
How Do I do this properly? I want to select data from a table where a certain column is equal to the value of my array at a particular element. The array and element num are both variables
Was the
var_dumpreturning false a bit of a give away?It means that your query did not work!