Hi! so last night I asked is there/how do you do a ocifetchstatement in mysql no one 

so this is what I ended up doing.....

function new_array($array)
        // get the keys

        $array2 = $array;
        $keys = array_keys($array2);

        // now use the keys to get the values

                $the_key = $keys[$a];
                $value = $array[$the_key];

                // we got the value and the key now lets put em where we want em...

                $new_array = array(
                                "$keys[$a]" => array(
                                        "0" => "$value" )
                $newer_array = array_merge_recursive($newer_array, $new_array);

function my_data_array($query,$link)
        global $debug;
        $result = mysql_query($query, $link);
        while($rows = mysql_fetch_array($result,MYSQL_ASSOC))
                } else {
                $array = array_merge_recursive($array, $rows);

it returns an array that is just like the array returned from ocifetchstatement... so 
if you are migrating from oracle to mysql and you do not want to rewrite all our 
scripts... that use ocifetchstatement.....

try this on for size


hope this helps someone and err saves them some time...

if anyone has a better way of doing this please send me the code.....

Jimmy Brake

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to