Trying to pull data from 2 tables. I think my select statement is ok but I am not sure about the Where, not getting any errors but no data is showing.
$result = mysql_query("SELECT pets.dog, pets.cat, pets.fish, pets.other, pets.other_type, about_me.headline, about_me.description, about_me.attribute_1, about_me.attribute_2, about_me.attribute_3, about_me.wls, about_me.wls_other, about_me.wls_month, about_me.wls_day, about_me.wls_year, about_me.wls_date, about_me.wls_goal_met, about_me.status, about_me.kids_have, about_me.kids_want, about_me.smoking, about_me.smoke_mate, about_me.alcohol, about_me.tattoos, about_me.pets, about_me.education, about_me.profession FROM about_me, pets WHERE about_me.userID = 'test' AND pets.userID = 'test'") or die(mysql_error());
while ($r=mysql_fetch_array($result))
{
$userID=$r["userID"];
$headline=$r["headline"];
$description=$r["description"];
$attribute_1=$r["attribute_1"];
$attribute_2=$r["attribute_2"];
$attribute_3=$r["attribute_3"];
$wls=$r["wls"];
$wls_month=$r["wls_month"];
$wls_day=$r["wls_day"];
$wls_year=$r["wls_year"];
$wls_goal_met=$r["wls_goal_met"];
$status=$r["status"];
$kids_have=$r["kids_have"];
$kids_want=$r["kids_want"];
$smoking=$r["smoking"];
$smoke_mate=$r["smoke_mate"];
$alcohol=$r["alcohol"];
$tattoos=$r["tattoos"];
$pets=$r["pets"];
$education=$r["education"];
$profession=$r["profession"];
}
I am pretty sure I need to modify these but have no idea how or even where to look.
$userID=$r["userID"];
$headline=$r["headline"];
$description=$r["description"];
$attribute_1=$r["attribute_1"];
$attribute_2=$r["attribute_2"];
$attribute_3=$r["attribute_3"];