Jump to content

muat

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

muat's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have sorted it. there was no problem with the sql. the data type for the 'time' fiels was a varchar therefor the system was putting them in the correct order based on the 1st number only ie 1,2,7,8,9. i channged the datat ype to a decimal (4,2) and it works perfectly.
  2. thay has helped, however my data is sill not in order page 1 Date 25/07 25/07 25/07 25/07 25/07 25/07 25/07 25/07 Time 10.10 10.30 10.50 11.10 11.30 11.50 9.30 9.50 page 2 Date 29/07 29/07 29/07 29/07 29/07 29/07 29/07 29/07 Time 10.00 10.20 10.40 11.00 11.20 11.40 12.00 12.20 page 3 Date 29/07 29/07 29/07 29/07 29/07 29/07 29/07 29/07 Time 7.20 7.40 8.00 8.20 8.40 9.00 9.20 9.40 $sql4 = "SELECT * FROM fgqcdetails WHERE JobName = '$_GET[job]' ORDER BY CheckDate ASC, timeTake ASC LIMIT $limitvalue, $limit"; any thoughts??
  3. I want to order the results of an SQL query by date 1st then by time. this will then alow me to insert records out of syen and for the report to still be correct. my code is currently: $sql33 = "SELECT * FROM fgqcdetails WHERE JobName = '$_GET[job]' ORDER BY CheckDate AND timeTake LIMIT $limitvalue, $limit"; this doesn't seem to be working!
  4. this is what i see in the URL which is quite strange. http://www.libraseafoods.com/LogOn/admin/DeleteCustomerSearchProcess.php?customercode=<?%20.$row[CustomerCode];?> and i wud expect / i want http://www.libraseafoods.com/LogOn/admin/DeleteCustomerSearchProcess.php?customercode=3 (for eg)
  5. yes i know, i was just goving an example of what usuallp appears at the bottom of the screen and what is appearing now. spaces aside it is a totally different look. any thought as to why the value isnt coming up and the php code is??
  6. Can anyone help?? this is driving me crazy??? ???
  7. I am just gettin a blank page now... when this wored in localhost for me, when i hovered over a thumbnail on a particualr line the link wud appear at the botton of the screen and the value would be there and it wud change if i moved the cursor eg http://www.libraseafoods.com/LogOn/admin/ViewCustomers.php?customercode = 3 now it says http://www.libraseafoods.com/LogOn/admin/ViewCustomers.php?customercode = <? echo $row['CustomerCode']; ?>
  8. by the way, this is what i have at the other side of the link $sql = "SELECT * FROM Customer WHERE CustomerCode=$_GET[customercode]"; could somethin be wrong with that??
  9. everything is in exactly the same directories on the server. and usint the ' ' didnt seem to make much difference!! this is 1 of those frustrating things!!! any other thoughts??
  10. Hey, I want to be able to pass a value as a variable over a link when the user clicks on a thumbnail at the end of a row in a table. obviously each row will bare a different resuly as a different value should be passed. i managed to get this to work whe i was workin using a localhost how my system has gone livee it seems to not pick up the variable value here is how i did it: <td><a href="../admin/DeleteCustomerSearchProcess.php?customercode=<? echo $row[CustomerCode];?>"><img src="../../images/delete.png" width="16" height="16" /></a></td> <td><a href="../admin/AmendCustomerSearchProcess.php?customercode=<? echo $row[CustomerCode];?>"><img src="../../images/pencil.gif" width="20" height="21" border="0" /></a></td> eg the user clicks on customer A1, and the links detects that the customercode = 1 and sends that number accross the link?? any thoughts????
  11. I have a dynamic table which is based on a table in my dayabase called 'brands' in the table i hold a value 'country' which is a int this number corrosponds to the 'countrycode' in my country table i want to be able to view the country name in my dynamic table not the country code i have managed to get this idea workin in aonther part of my system but for some reason it wont work here and i have looked at it that much it doesnt make sence ne more!! below id my code $sql = " SELECT * FROM brand where brandcode >0 ORDER by brand"; //put the SQL result into a variable //take the results from the results from the SQL suery and place in a variable $result $result = mysql_query($sql) or die(mysql_error()); //count the number of rows in the variable and store the answer in $num $num = mysql_num_rows($result); $row = mysql_fetch_assoc($result,MYSQL_ASSOC); extract ($row); $sql2 = "SELECT * FROM country Where CountryCode = '$row[Country]'"; $result2= mysql_query($sql2) or die(mysql_error()); $row2 = mysql_fetch_array($result2,MYSQL_ASSOC); while($row=@mysql_fetch_array($result)) //$row_color = ($row_count % 2) ? $color1 : $color2; { if ($row_counter == 1) { $bgcolour = $color1; $borderc = $color1; $row_counter =0; } else { $bgcolour = $color2; $borderc = $color2; $row_counter =1; } //?> <tr bgcolor="<? echo $bgcolour; ?>" bordercolor="<? echo $borderc;?>"> <td><?php echo $row[brand]; ?> <input name="brandcode" type="hidden" id="brandcode" value="<? echo $row[brandCode]; ?>" /></td> <td><?php echo $row[Packer]; ?> </td> <td><?php echo $row2[country]; ?></td> <td><?php echo $row[appNo]; ?></td> <td> </td> <td><a href="../admin/DeleteBrand.php?brandcode=<? echo $row[brandCode];?>"><img src="../../images/delete.png" width="16" height="16" /></a></td> <td><a href="../admin/AmendBrand.php?brandcode=<? echo $row[brandCode];?>"><img src="../../images/pencil.gif" width="20" height="21" border="0" /></a></td> </tr> <?php // Increment the row count //$row_count++; //$row_count++; } ?> database code Create table brand ( BrandCode int(5)AUTO_INCREMENT, Brand Varchar(200), Packer Varchar (200), Country int(200), appNo varchar (30), primary key(BrandCode) ) ; Create table country ( CountryCode int(5)AUTO_INCREMENT, country char(200), primary key(CountryCode) ) ; Any Thought any one??
  12. HAHA, that has worked!!!! <?php as apposed to <? i havent got a clue why this is but it works!! thank you very much i really appreciaty all your help.
  13. I have tried that, and still no joy!! any other thoughts??
  14. getfile.php <? $file = $_GET['f']; header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header( "Content-Disposition: attachment; filename=".basename($file)); header( "Content-Description: File Transfer"); header('Accept-Ranges: bytes'); header('Content-Length: ' . filesize($file)); @readfile($file); ?> error in browser <? $file = $_GET['f']; header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header( "Content-Disposition: attachment; filename=".basename($file)); header( "Content-Description: File Transfer"); header('Accept-Ranges: bytes'); header('Content-Length: ' . filesize($file)); @readfile($file); ?> any thoughts??
  15. i have spoken to the host and there are no errors been logges at their end. i have also tried changeing the name of the file to .pdq to see if it brought an error and it didnt. is there something wrong with the getfile.php????
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.