note 62465 deleted from function.array-walk by betz
| From: | betz@php.net | Date: | Wed, 01 Mar 2006 10:41:49 +0000 |
| Subject: | note 62465 deleted from function.array-walk by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-104607@lists.php.net to get a copy of this message | ||
Note Submitter: www.eltayb.com
Reason: useless
----
HI,
i think we can use this function also in altering the MySQl query results with this method :-
1- make a new connection with data bas and select the specified database as known .
2- we'd make a query for example ouput all usernames saved in table called "users" as
:-
$query = "SELECT * FROM users ORDER BY id DESC";
3-we'd exceute this query now :-
$result = mysql_query($query,$link);
as $link is the database connection handler variable .
4-we'd now ouptut the results and push them in a new array called "users" for example
:
while ($row = mysql_fetch_array($result)) {
{array code goes here}
}
5-We'd now use that function in altering the array with any new modifications we need like
making all letters in some field must be caps or filtering some another one and many many
modifications !
yours ,
Ahmed (Eltayb.Com) .