Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by bh

  1. Youre code is ok! Didnt you forget the select tag before options? select
  2. Hi, Whats your question? insert...select INSERT INTO tbl_temp2 (fld_id) SELECT tbl_temp1.fld_order_id FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;[/color] Why do you select your "Field" column twice?
  3. Hi, with meta-refresh tag?
  4. Hi, try the array_walk_recursive function. Heres an example: $array = array('a' => 2, 'b' => array('c', 'd', 2, 3)); function modder(&$item, $key) { if (is_string($item)) $item = 'n.'.$item; } array_walk_recursive($array, 'modder');
  5. Hi, eg with number_format and date_format: number_format(14728293, 0); date_format(new DateTime('2011-01-19'), 'F d, Y');
  6. hi, with array_map function you can easily do this (see example 3 on the manual page).
  7. Its a problem with your query: $sql="SELECT * FROM $tbl_13"; In the function you dont define $tbl_13 variable (i think its a global)
  8. Hi, i cant find "natural" sort in mysql functions, but if the prefix (Polmed_) is always fix then you should get the number from the string. SELECT name FROM images ORDER BY CONVERT(SUBSTRING_INDEX(name, '_', -1), UNSIGNED);
  9. function show_pricelist($table) { db_connect(); $query = ("SELECT * FROM {$table}"); // Again, if pricelist can be a variable, then I need only 1 function $result = mysql_query($query); $result = result_to_assoc($result); return $result; }
  10. Interesting question. In html with meta tag? <meta http-equiv="refresh" content="1;url=http://www.example.com"> But, i think "header" function (with status:302) its ok.
  11. mysql date functions manual - dayofweek(date)
  12. DATE_ADD('2010-05-10', INTERVAL 3 DAY); -> 2010-05-13 in your situation: DATE_ADD(GETDATE(), INTERVAL 3 DAY);
  13. or if its good for you, can query the auto increment value for a table: SHOW TABLE STATUS LIKE 'table_name'; heres the Auto_increment column.
  14. Hi, SELECT * FROM areas WHERE county != 'xxxx' GROUP BY county ORDER BY county_category; or http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_not-in
  15. bh

    SOAP Help

    Hi, You need the WSDL file: <?php $asc = new SoapClient('https://www.asc.gov/wsvc/ASCQuerySvc.asmx?WSDL'); return $asc->GetQueryableFields(); ?>
  16. If you upload a file, best use this function: move_uploaded_file() With this function you can easily rename the file, becouse you must add the file to the destination parameter.
  17. Hi, try one of these: bots, bot recognizer.
  18. Hi, try this: html_entity_decode("£", ENT_QUOTES, "UTF-8");
  19. Hi, You can create a table from a joined select query eg like that: CREATE TABLE table_1 SELECT x.col FROM table_x AS x JOIN table_y AS y ON x.col2 = y.col2 In php myadmin you at default you can export the structure of the table, anyway theres a structure fieldset under the export tab.
  20. Hi, use LIKE SELECT * FROM `tutor_prefered_subject` WHERE Prefered_Level ='lower primary' && Prefered_Subject LIKE '%english%'
  21. If you want to stay a simple solution an array is a good choice. Another simple solution is mysqli with prepared statements.
  22. The problem is with your query. The error contains "boolean given" so your query probably returns false.
  • 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.