I had two result sets (names) loaded into arrays, in this case $result_base and
$result_compare. I needed to check how similar each name was to every other name. In
order to do that, I used a nested while() function like so:
<?
while ($base = mysql_fetch_array($result_base)) {
mysql_data_seek($result_compare, 0);
while ($compare = mysql_fetch_array($result_compare)){
//code do do the comparison
}
}
//I'm sure there are more elegant ways to do this, but this worked for me.
?>
This simple function will take a few arguments and easily set a associative array for each column in a result from a MySQL query Categories : Databases , PHP , MySQL , Arrays This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server. Categories : Databases , MySQL , Complete Programs , PHP , Databases Sort the results from a SELECT query (any number of columns) into an array automatically. Categories : PHP , PHP Classes , Arrays , Databases , MySQL A database abstraction layer for the PHP Oracle 8 module (available from PHP 3.0.5). It supports persistent connections, fetching rows into arrays, prepare/execute (variable binding) and has a new and improved error interface. Categories : Databases , Oracle , PHP , Arrays , Variables Function for retrieving MySQL enum values into a PHP array.
Categories : PHP , Databases , MySQL , Arrays create a grid out of <INPUT TYPE=TEXT> then saving to a database. Uses
a 'multi-dimension array', but not really as the array is just one big array
with the index of "[$i][$j]". Have a look at the code and you'll see what I
mean. Categories : PHP , MySQL , Arrays , Databases Simple conversion functions to change MySQL dates to arrays, arrays to MySQL dates.
Categories : PHP , Arrays , Date Time , Databases , MySQL Finds the median in an array of numbers - Can be used with a MySql database column read into an array Categories : PHP , Arrays , Databases , MySQL Logs hits to any page which includes it. Automatically utilises page access information left behind by PHP/FI2.0. Categories : Databases , PHP , mSQL , Databases dynamic table columns Categories : PHP , HTML and PHP , Arrays , Databases , MySQL How to load a query result into a PHP Array Categories : PHP , Databases , Arrays , MySQL This functions makes it easy to use session-variables known from ASP. With one Cookie the array "session" will save and restore from a db-record. In this version MySQL is used but it's should very easy to change Categories : PHP , Arrays , Cookies , MySQL , Databases How to pass an array to a function, or how to define a
function wich recieves an array. Categories : Variables , PHP , Arrays Data Retrieve from Mysql using AJAX with PHP Categories : PHP , AJAX , Date Time , Databases , MySQL Simple PHP Form Auto Generation based on MySQL query Categories : PHP , Form Processing , Databases , MySQL , Sessions