How To Make Mysql Query Into Array



How To Make Mysql Query Into Array
 (381) dminister a web business
How To Make Mysql Query Into Array
Post Description:
Post Tags: how, to, make, mysql, query, into, array
This Post Has Been Viewed 203 Times Since Sat Apr 26, 2008 9:04 pm Posted By hostman with 0 replies
How To Make Mysql Query Into Array
i often use this handy sql query to make my queries from mysql database into an array like this:
$config  = array();
$sql = "SELECT config_name, config_desc,config_value FROM ".$db_prefix."config";
$result = mysql_query($sql ,$db);
	if ($myrow = mysql_fetch_array($result)) {
		do  {
			$config[$myrow['config_name']] = $myrow['config_value'];
		} while ($myrow = mysql_fetch_array($result));
	} else {
		 PageError ('ALERT: 12 There was an error with your request');
	}

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About How To Make Mysql Query Into Array




(0) Comments