mikebyrne Posted January 28, 2008 Share Posted January 28, 2008 I want my sql within my php to show all records where the orderscompleted field is "0" my code is: <form action = "processed.php" method="post"> <table width="850" border="0" cellspacing="0" cellpadding="0"> <?php // let's get some data include('adminconnect.php'); $sql = mysql_query("SELECT OrderNo, Orderdate, Custname, Amount, Shippingmet FROM admin WHERE Ordercompleted = "0" while( $row = mysql_fetch_array($sql) ) { // loop through and display ?> <tr align="left"> <td width="33"> </td> <td><input type = "checkbox" name="order[<?php echo $row['OrderNo'];?>]" value="checked"></td> <td width="33"> </td> <td width="82"><a href="javascript:openWindow('popup_detail.html', 'NewWindow', 615, 600)" class="black"><?php echo $row['OrderNo'];?></a></td> <td width="61" align="center"><?php echo $row['Orderdate'];?></td> <td width="230" align="Left"><?php echo $row['Custname'];?></td> <td width="170" align="center"><?php echo $row['Trackno'];?></td> <td width="56" align="right"><?php echo $row['Amount'];?></td> <td width="21"> </td> <td width="136" align="center"><?php echo $row['Shippingmet'];?></td> </tr> <? } ?> </table> <!-- data finish --> <!-- --> <div id="btn"> <input type="submit" value="Process"> <div id="btnSpace"> <!-- --> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <div class="padTop16"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- btn finish --> <div class="clr"> <!-- --> </div> <!-- data content finish --> <!-- data btm start --> <div id="containerBg3"> <div class="padTop1"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data btm finish --> <!-- btm start --> <div id="containerBg1"> <div class="padTop15"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <div id="container"> <div id="line"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <div class="padTop16"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- btm finish --> </form> Quote Link to comment https://forums.phpfreaks.com/topic/88217-solved-show-unprocessed-orders/ Share on other sites More sharing options...
PHP Monkeh Posted January 28, 2008 Share Posted January 28, 2008 $sql = mysql_query("SELECT OrderNo, Orderdate, Custname, Amount, Shippingmet FROM admin WHERE Ordercompleted = "0" Should be $sql = mysql_query("SELECT OrderNo, Orderdate, Custname, Amount, Shippingmet FROM admin WHERE Ordercompleted = 0"); Quote Link to comment https://forums.phpfreaks.com/topic/88217-solved-show-unprocessed-orders/#findComment-451402 Share on other sites More sharing options...
mikebyrne Posted January 28, 2008 Author Share Posted January 28, 2008 LOL Cheers!! that was driving me mental What im trying to do now is put a textbox within the Tracking number field so i can fill in the tracking number for each record displayed. How can i do that? Quote Link to comment https://forums.phpfreaks.com/topic/88217-solved-show-unprocessed-orders/#findComment-451406 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.