Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by abdelelbouhy

  1. Hi, in your code thereis an issue when you fetch the result $query2 = mysqli_fetch_array($query,MYSQLI_ASSOC); note the second arg MYSQLI_ASSOC the next step is to get the status field from the result like that $result = $query2['status']; then test it if($result == "Expired"); and here is a link explain it http://uk3.php.net/mysqli_fetch_array
  2. Hi guys, i have two tables products and deleted_products i want to select products_id from the two tables where the field suspend = 1 but there's no relationship between the tables in other words i want all the products_id from the tables where suspend = 1 but the products_id in table one doesn't match produtcs_id in table 2 the only relationship i can find is the suspend in both tables is 1 my query string is like that select p.products_id as PID, dp.products_id AS PDID FROM products p, deleted_products dp WHERE p.suspend = dp.suspend and p.suspend = 1 it return zero result b
  3. thank you very much mate now i got it all
  4. Thank you i was trying to figure it out all day but when i call it the last time with 2 parameters var old should have the previous one the one with 1 parameter instead of the one with no parameter because the object property has the same name find it should be overwritten i know you said it queued up all but how is that if the property name is the same
  5. Thank you very much now start to clear it a bit one more thing how the arguments inside the clouser refer to the function that is passed as the argument to the outer function shouldn't arguments inside the inner refer to the arguments of the inner function
  6. Sorry mate i fixed the indent my question is how the code calls different functions even if the arguments length is always 0 or i'm missing something
  7. Hi guys, can you please explain how this code is working i'm a bit confuse about the fn.length == arguments.length here the code function addMethod(object, name, fn) { var old = object[name]; object[name] = function(){ if (fn.length == arguments.length){ //this line i don't understand how it works return fn.apply(this, arguments) }else if (typeof old == 'function'){ return old.apply(this, arguments); } }; } var ninjas = { values: ["Dean Edwards", "Sam Stephenson", "A
  8. Hi guys is there any function can increase image size for example from 20 KB to 40 KB without changing the height and width Thanx
  9. many thanks is there is anyway in php let me download more than a file in one http request the problem is after i create the five files i need to download them all together that why i'm trying to zip them
  10. the full path is like that ADMIN . 'files/csv/amazoninventorysku/ the folder got created and zipped and the files is added to it but it's empty
  11. hi guys i'm having a problem zipping files to folder what is happing the script zip the folder and add some files to that folder then it download the folder but when i unzip the folder i find empty files with 0 KB but when i download via FTP( the unzipped files) contain content any idea the code is like that $zip = new ZipArchive; generate the filegenerateAmazonSkuCSV($arra_sku_uk,$csvsavefilepath,'cb_uk');$csvdowloadfilepath = 'files/csv/amazoninventorysku/';$file_type = 'application/csv';$file_name = "cb_uk_amazon_stock.csv";$file = DIR_FS_ADMIN.$csvdowloadfilepath . $file_name;if ($zip->
  12. hello,if you replace onclick="cWindowHide();" with onClick="window.location.reload()" that's not going to work you removed the function that close the popup what you need to do is to assign document.location.reload() to onclick so your code should look like onClick="cWindowHide(); document.location.reload()" like that you call both functions
  13. Hello,i'm trying to move uploaded file the problem is i want to move to another site but it's under the host so my host directory looks like that /var/www/vhosts site1 site2 site3 site4we are running the four sites from 1 back end which is site onewhen i use for site 1 $uploadFile = '/var/www/vhosts/site1/images/' . $_FILES[$image['table']]['name']; @move_uploaded_file($_FILES[$image['table']]['tmp_name'], $uploadFile);it works finenow i need to move it to site2 $uploadFile = '/var/www/vhosts/sit
  14. hello guys,this function just to get products_id function getProductId( $model, $importFrom = '' ) //retrun product id{ if( empty( $model ) ) { return 0; } if($importFrom == 'Play'){ $sql_where = " play_sku = '$model'"; }else{ $sql_where = " products_model = '$model'"; } $select_orderid_query_raw = "SELECT * FROM " . TABLE_PRODUCTS . " WHERE " . $sql_where; $select_orderid_query = tep_db_query($select_orderid_query_raw); $productsId = 0; while ( $orderId = tep_db_fetch_array($select_orderid_query) ) { $productsId = $orderId['products_id']; } return $productsId;}what happe
  15. hello guys,i'm developing 3 e-commerce sites for a company the manager want to be able to manage all the sites from one backend i developed the first site and they can manage the new site with the old one from one backend now my question is developing those site will slow down the sites and if so what should be done to avoid this problem do i have to upgrade the CPUs or what is the best to do please help
  16. abdelelbouhy

    mysql alias

    hello guys if someone can explain this when we create alias we say "select p.product_id from product as p" that is fine but in oscommerce the statement is written like that "select p.product_id from products.p" there's no "AS" so i wonder if both products.p and products AS p are equal
  17. hello try to change this 'input[name=info]').change to 'input[name=info]').click so 'change' event handler to 'click' event handler
  18. one way is to use ajax when the page load //create the xhr objectfunction createXHR(){ if (typeof XMLHttpRequest != "undefined"){ return new XMLHttpRequest(); } else if (typeof ActiveXObject != "undefined"){ if (typeof arguments.callee.activeXString != "string"){ var versions = ["MSXML2.XMLHttp.6.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp"]; for (var i=0,len=versions.length; i < len; i++){ try { var xhr = ne
  19. for the second problem you can pass the string to this functionfunction parseXml(xml){ var xmldom = null; if (typeof DOMParser != "undefined"){ xmldom = (new DOMParser()).parseFromString(xml, "text/xml"); var errors = xmldom.getElementsByTagName("parsererror"); if (errors.length){ throw new Error("XML parsing error:" + errors[0].textContent); } } else if (document.implementation.hasFeature("LS", "3.0")){ var implementation = document.implementation;
  20. hello guysi got a client ask me to Integrate courier tracking information into email i don't understand what he mean by that is it to install software to do that or write php script to select data from database then send as email if anyone done that before please tell me what that mean because i googled it but i couldn't find any solutionsthanx
  21. you are missing the curly braces around the alert so it should be function my functionjs(){ alert('text'); }
  22. place your items in a list <ul><li><img></li><li><img></li></ul> then with the css li{float:left} that will place them next each others
  23. function stopEvent(event){ var event = event ? event : window.event; if(typeof event.stopPropagation != 'undefined'){ event.stopPropagation(); }else{ event.cancelBubble = true; } }
  24. i tried in 9,8,7 but in seven it still works but give you warning if you wnt keep running the script
  • Create New...