I am having trouble running a query to pull out certain results from my database.
Right now I have
$query = "SELECT * FROM `sperm`";
$query2= "SELECT * FROM `cperm`";
$result = mysql_query($query);
$result2 =mysql_query($query2);
//check to see if query worked
if (!$result)
{
echo "Query on Connection failed!";
// exit
}
However I want to pull up a country. So what I need is something like this
$query = "SELECT * FROM `sperm` WHERE $country_origin = "country";
or something like that, but I am unable to get it to work. My table consists of Country_Origin, City_Origin, and Date_Left. Could someone please steer me in the right direction? 🙂