bh
Members-
Posts
238 -
Joined
-
Last visited
Everything posted by bh
-
Youre code is ok! Didnt you forget the select tag before options? select
-
Hi, Is your php file also in UTF-8?
-
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?
-
Hi, with meta-refresh tag?
-
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');
-
Hi, eg with number_format and date_format: number_format(14728293, 0); date_format(new DateTime('2011-01-19'), 'F d, Y');
-
Help with joining/merging two array values together
bh replied to ja_blackburn's topic in PHP Coding Help
hi, with array_map function you can easily do this (see example 3 on the manual page). -
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)
-
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);
-
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; }
-
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.
-
mysql date functions manual - dayofweek(date)
-
DATE_ADD('2010-05-10', INTERVAL 3 DAY); -> 2010-05-13 in your situation: DATE_ADD(GETDATE(), INTERVAL 3 DAY);
-
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.
-
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
-
Hi, You need the WSDL file: <?php $asc = new SoapClient('https://www.asc.gov/wsvc/ASCQuerySvc.asmx?WSDL'); return $asc->GetQueryableFields(); ?>
-
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.
-
Hi, this is from the PHP manual: header()
-
Hi, try one of these: bots, bot recognizer.
-
Hi, try this: html_entity_decode("£", ENT_QUOTES, "UTF-8");
-
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.
-
Hi, use LIKE SELECT * FROM `tutor_prefered_subject` WHERE Prefered_Level ='lower primary' && Prefered_Subject LIKE '%english%'
-
If you want to stay a simple solution an array is a good choice. Another simple solution is mysqli with prepared statements.
-
The problem is with your query. The error contains "boolean given" so your query probably returns false.