Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to customise PHP MYSQL tables?
    primarykey
    data
    text
    <p>I using 3 tables to store booking information: eventinfo, customer and testbook. </p> <p>My Coding:</p> <pre><code>&lt;?php include('config.php'); $per_page = 9; if($_GET) { $page=$_GET['page']; } //get table contents $start = ($page-1)*$per_page; $sql = "SELECT bookingID,eventinfo.eventTitle,boothAlias,testbook.bstatus,date'" ."testbook.username, customer.companyName, customer.contactName" ."from eventinfo, testbook, customer where testbook.username=customer.username" ." and testbook.eventID=eventinfo.eventID order by date limit $start,$per_page"; $rsd = mysql_query($sql); ?&gt; &lt;table width="800px"&gt; &lt;?php //Print the contents while($row = mysql_fetch_array($rsd)) { $id=$row['companyName']; $contactName=$row['contactName']; $eventTitle=$row['eventTitle']; //$phone=$row['phone']; $date=$row['date']; $status=$row['bstatus']; $booth=$row['boothAlias'] ?&gt; &lt;tr&gt;&lt;td style="color:#B2b2b2; padding-left:4px"&gt;&lt;?php echo $id; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $contactName; ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php echo $eventTitle; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $booth; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;?php echo $date; ?&gt;&lt;/td&gt;&lt;td&gt;&lt;select name='status' id='status'&gt; &lt;option value='-1'&gt;--Select--&lt;/option&gt; &lt;option value='0'&gt;Approve&lt;/option&gt; &lt;option value='1'&gt;Reject&lt;/option&gt; &lt;option value='2'&gt;Pending&lt;/option&gt; &lt;/select&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } //while ?&gt; &lt;/table&gt; </code></pre> <p>And it return this:</p> <p><img src="https://i473.photobucket.com/albums/rr93/meow0209/query.jpg" alt="picture1"></p> <p>I try to print out the record in the following pattern:</p> <p><img src="https://i473.photobucket.com/albums/rr93/meow0209/query2.jpg" alt="picture2"></p> <p>Anyone can help me?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload