Jump to content

abdelelbouhy

Members
  • Content Count

    103
  • Joined

  • Last visited

Community Reputation

2 Neutral

About abdelelbouhy

  • Rank
    Member
  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
×
×
  • Create New...