Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. for deleting see here unlink
  2. its probably not being closed.. try this reboot the server. then try this script before another test. <?php $fp = fopen('thefile.txt', 'w'); fwrite($fp, 'Hello World'); fclose($fp); ?>
  3. usort is user-defined, but your still loss the keys (i think) if you wanted it to be user-defined then your need to use uasort but asort() is the one you want
  4. Heres an update Note the change to the SQL statement "ORDER BY ProductType" <?php include('connect.php'); $getaccountinfo = mysql_query("SELECT * FROM Account"); $snagaccount = mysql_fetch_array($getaccountinfo); $AccountID = $snagaccount['AccountID']; $AccountName = $snagaccount['AccountName']; $AccountProductList = $snagaccount['AccountProductList']; ?> <html> <head> <title> Inventory </title> </head> <body> <div align=center> <br><br><br> <b>Account ID</b>: <?php echo($AccountID); ?> | <b>Account Name</b>: <?php echo($AccountName); ?> <br><br> <?php $getaccountlist = mysql_query("SELECT *.Products FROM Products, Account WHERE ID IN (Account.AccountProductList) ORDER BY ProductType"); echo " <table> <tr> <td align=center colspan=4> <b>Shirts</b> </td> </tr> <tr> <td> Product ID </td> <td> Product Name </td> <td> Product Type </td> <td> Product Price </td> </tr>"; $type = ""; while($row = mysql_fetch_array($getaccountlist)) { $UserProductID = $row['ProductID']; $UserProductName = $row['ProductName']; $UserProductType = $row['ProductType']; $UserProductPrice = $row['ProductPrice']; //this If create headers for each type if($type != $UserProductType) { echo "<tr><td colspan=\"4\">$UserProductType</td></tr>"; $type = $UserProductType; } echo " <tr> <td> ".$UserProductID." </td> <td> ".$UserProductName." </td> <td> ".$UserProductType." </td> <td> ".$UserProductPrice." </td> </tr>"; } echo "</table>"; ?> </div> </body> </html>
  5. happy to help:) can you click solved to close this thread (saves other having to read it, only to findout its solved)
  6. use asort() instead of sort()
  7. the output should of looked something like this ItemID - ItemName - ItemType - ItemPrice 111 - abc1 - thing1 - $5.99 112 - abc1 - thing2 - $5.99 113 - abc1 - thing3 - $5.99 etc
  8. from a quick scan i would guess $newname = $path . "http://www.eaglelegend.com/" . $user . "_" . $r . "." . $typer; should be $newname = $path . $user . "_" . $r . "." . $typer;
  9. Okay first off, did you get a list, with correct data ? if not then we need to fix that first.. if thats working then we need to make it look nice. for example into a table not just raw text (as mine is)
  10. Sounds like a HTML/CSS problem, if i'm wrong can you explain a little clearer please
  11. Cool, Now pleaseeeeeeeeeeeee click topic solved (that will make my day) PS: i have a few broken computers here, PC & Mac
  12. well PHP PHP 5.2.6 is out http://www.php.net/downloads.php in 5.2.1 their was a bug with the zip creation (thats why i asked about it) Theirs a bug in my script readfile($str_filename); should be readfile($str_filepath);
  13. it should be this $broad1name3="image/thumbs/thumb_".$image_name."?".$rand;
  14. no need, the code should run fine as it, as a note readfile($str_filename); uses more memory but thats not the issule at the moment.
  15. try this <?php $fgc = file_get_contents('http://www.site.org/feed/btg.xml'); preg_match_all('/id="xhr_([0-9]+)"/si', $fgc, $cms, PREG_PATTERN_ORDER); $result = $cms[1]; echo "<pre>";print_r($result);echo "</pre>"; ?>
  16. lol beat me to it your welcome if your done, can you click solved please
  17. thanks StormTheGates, i said that in the 2nd post anyway to be trueful it might be easier to pull them out into an array and sort them, i know why you have the problem but can't think how to solve it.. this is from the first record and its joins A1 A2 BK8 BK9 BK16 C3 the rest is from the next record and its joins, etc etc
  18. yes, providing its after the extension, which i think it is on your example
  19. Okay well its a valid zip file, with the index of 2 files photo_1.jpg photo_2.jpg but its truncated (only has the first part of the file).. try this revised version <?php $str_filename=""; $str_filepath=""; $str_ext=""; $str_filename=trim($rs_download_file->fields("photosetfilename")); $str_filepath=trim($UPLOAD_ZIPFILE_PATH.$str_filename); header("Pragma: public"); header("Expires: 0"); // set expiration time header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=".basename($str_filename)); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($str_filepath)); readfile($str_filename); exit(); #$fp=fopen($str_filepath,'rb'); #fpassthru($fp); ?>
  20. yes but theirs another problem, it will only return the first record change <?php $getaccountlist = mysql_query("SELECT *.Products FROM Products, Account WHERE ID IN (Account.AccountProductList)"); $row = mysql_fetch_array($getaccountlist); $ItemID = $row['ItemID']; $ItemName = $row['ItemName']; $ItemType = $row['ItemType']; $ItemPrice = $row['ItemPrice']; ?> to $getaccountlist = mysql_query("SELECT *.Products FROM Products, Account WHERE ID IN (Account.AccountProductList)"); echo "ItemID - ItemName - ItemType - ItemPrice"; while($row = mysql_fetch_array($getaccountlist) { $ItemID = $row['ItemID']; $ItemName = $row['ItemName']; $ItemType = $row['ItemType']; $ItemPrice = $row['ItemPrice']; echo "$ItemID - $ItemName - $ItemType - $ItemPrice"; ?> your need to build this into the html part a (mine is just basic) to check the correct data is being returned
  21. the reason i hard coded it was because the database should return that (on this test), the fact the test worked proves the database isn't returning the correct data.. if the problem is purely a caching issule you can do this <?php $rand = time(); echo "<img src='myimage.jpg?$rand' >"; ?>
  22. can you post the 152 KB file (attached it). i have an idea
  23. the use is on the main and the cart is on the addon correct? main passes the PHPSESSID to addon session_start(); $_SESSION['test'] = "Hello"; $PHPSESSID= session_id(); echo "addon.other.com/index.php?PHPSESSID=$PHPSESSID;" addon session_id($_GET['PHPSESSID']); session_start(); echo $_SESSION['test']; is that what your doing, becuase that should work..
  24. try this, do updates (see comments) <?php $query = "SELECT broad1 FROM images_broad"; $result=mysql_query($query); while($row=mysql_fetch_array($result)) { $image_path=$row['broad1']; } //Add line beow $image_path= "thumbs/thumb_image161.jpg"; $path= 'http://www.acmeart.co.uk/mercury/image';//append the /image ?> now if that works, its a problem with the database (i don't have the db so i can't test that)
  25. Humm without testing it myself its hard to say but try this $listing_sql = "select $select_column_list p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, CASE WHEN ASCII(RIGHT(p.products_model, 1)) > 47 AND ASCII(RIGHT(p.products_model, 1)) < 58 THEN LPAD(CONCAT(p.products_model, '-'), 5, '0') ELSE LPAD(p.products_model, 5, '0') END AS `vsort` from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "' ORDER BY `vsort`";
×
×
  • 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.