MySQL Forums
Forum List  »  Newbie

Trying to learn the right way
Posted by: Rodney Emm
Date: September 30, 2018 03:20PM

I'm not sure if I'm going at this in the proper way.

I want to show Gate Shifts for Wed-Thur-Fri-Sat-Sun
Hours are like - wed 2:00pm to 6:00 pm - wed 6:00pm to 8:00 pm
thurs 7:00am to 11:00 am - 11:00 to 3:00 - 3:00pm to 7:00pm - 7:00pm - 11:00pm
( Friday - Saturday - Sunday are the same hours as Thursday )

Do I create a table with all the shifts (wed_2to6_a - wed_2to6_b -wed_2to6_c )
since there are 3 people on a shift..?

or

Create a Table for Wed-Thur-Fri-Sat-Sun
Create a Table for Gate Times

I created one already with the times "wed_2to6_a - wed_2to6_b -wed_2to6_c"
and am able to get the names of the people on that shift with the

$sql="SELECT `wed_2to6_a`,`wed_2to6_b`,`wed_2to6_c` FROM `TABLE_13` WHERE 1";

if ($result=mysqli_query($con,$sql))
{
// Fetch one and one row
while ($row=mysqli_fetch_row($result))
{
printf ("%s %s %s\n",$row[0],$row[1],$row[2],$row[3]);
}
// Free result set
mysqli_free_result($result);
}


But I don't think I'm doing it right.
I do get ( Deb Frey Ted Beardsley LePosa )
So I know it's working/working

But how do I put them into columns like an Access Report in PhP.?
Or am I thinking way too much out of the box?

I don't expect anybody to do it for me...Just point me in the right direction

Options: ReplyQuote


Subject
Written By
Posted
Trying to learn the right way
September 30, 2018 03:20PM
September 30, 2018 06:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.