I am trying to orginize the following code to order by date not id number.
any help would be great
Code: [Select]<?php
// Status
// 1. inshop
// 2 in progress
// 3 pending
// 4 to be picked up
// 5 Done. Out of office.
$db = mysql_connect("x","x","x") or die("Couldn't connect");
mysql_select_db("x",$db) or die("Couldn't select database");
$query="SELECT * FROM `calls` WHERE `status` = '1' AND `priority` != 1";
$result=mysql_query($query);
$num=mysql_numrows($result);
print '<table width="100%" border="0">';
print "<tr><td><b>In Shop: $num
</b></td></tr>";
$i=0;
while ($n < $numa) {
$customer=mysql_result($result_customer,$n,"name");
$n++;
};
$id=mysql_result($result,$i,"id");
$date=mysql_result($result,$i,"date");
$time=mysql_result($result,$i,"time");
$customer=mysql_result($result,$i,"customer");
// $worksheetnum=mysql_result($result,$i,"worksheetnum");
// $worksheetnum =mysql_result($result2,$i,"($_POST['worksheetnum'])");
$worksheet=mysql_result($result,$i,"worksheet");
#Find customer name out of customer field
$query_customer="SELECT `name` FROM `customers` WHERE `id` = $customer";
$result_customer=mysql_query($query_customer);
$numa=mysql_numrows($result_customer);
$n=0;
while ($n < $numa) {
$customer=mysql_result($result_customer,$n,"name");
#end
//View Inshop
print '<FORM ACTION="GWS_online_lookup.php" method=post>';
print "<tr><td width=11%><input type="hidden" name="wo" value=$id><input type="submit" value="View"/>";
print "</td>";
print '<td align="left" width="29%">';
// print '<b><h3>';
print "$customer";
// print '</b></h3>';
print '</td><td width="24%">';
// print '<b><h3>';
print "$date";
// print '</b></h3>';
print '</td><td width="20%">';
// print '<b><h3>';
print "$time";
// print '</b></h3>';
print '<td width="16%">';
// print '<b><h3>';
print "WS $id";
// print '</b></h3>';
print '</td>';
print '</form>';
$n++;
};
// $i++;
// };
print "</table>";
$worksheetnum = trim(stripslashes($_POST['worksheetnum']));
$customerid = trim(stripslashes($_POST['customerid']));
$id = $_POST['wo'];
print $worksheetnum;
print "<input type="hidden" name="worksheetnum" value=$worksheetnum>";
print "<input type="hidden" name="customerid" value=$customerid>";
print "<input type="hidden" name="wo" value=$id>";
?>
Tracking Unique Clicks
Hi guys and gals,Basically I have a database which tracks clicks on my outbound links, I do this by linking to a page like so.../redirect.php?id=1The page then reads the id and increments the click
I need an iframe that calls up a different page according to the date
hiI don't know any php (only html) and I urgently need to do the following: I need an iframe that calls up a different page according to the date e.g. on the 2th Dec a page called 'special2.php',
Logic question
im wondering what's the best method to do the above list:it is for alliance @ MMORPG game -the administrator of alliance have 10 slots for creating ranks ... each rank have it's own permissions (in
formating when pulling data from a mysql databaseOk so Im not to sure if this is the right thread to post in but here is my catch 22 issue.I have a test web page www.aandstech.com.au/test.phpTest.php pulls its content from a my sql table.This works
PHP page loading in Firefox but not in IE
hello,i am currently doing a project in PHP and i have a problem. If I view the project in Mozilla Firefox it works fine but if i open using IE i am having problem with the design which is not getting
Is this Safe or Unsafe?
Hi i made a few pages with lots of peoples help now i just want to know if they are safe or not can anyone help me?here are the codesRegisterCode: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the going through something like paypal. I've never done that before...what is my first step? I really dont
Pop-up Banner
Hello Friends,I need to use banner in our client site.Example: www.example.com if i enter this site immediately pop-up window should open and the main page at the back should be disabled.If i click
PHP referral database. I would like this form to email the referrer.
Okay, Hello I've been trolling for years. This the first time I've ever asked for php help. Normally my questions seem so amateur when I finally find theanswer on my own. But this is making me pull my
Upload, SSL and more php help
I recently just installed a ssl cert and do i use https for the whole site or just for the checkout.php and cart.php and login.php files?whats the proper way to use https?I have 2 more questions, when