I am trying to get a specific square in a mysql table. Here is what I have so far.
$sql = "select Saturdaymorning From schedule where username like '%$user%';";
$stmt = $db->prepare("select Saturdaymorning From schedule where username like '%$user%';");
$stmt = $db->exec($sql)
$sql1 = "select Saturdayafternoon From schedule where username like '%$user%';";
$stmt1 = $db->prepare("select Saturdayafternoon From schedule where username like '%$user%';");
$stmt1 = $db->exec($sql1)
I am able to get the first one to work but the second gets a buffer error. How could one run multiple queries at once. I do not understand the "fetchall()" command or how it works. Thanks
[EDIT] I have to call them apart because I use them in if statements akin to
if($sql = "yes"){ satmorn = "Saturday Morning"}
and so on.