What I'm trying to do is get the following php-script to work... (the only
thing about this that doesn't work is in the fourth 'echo' line...)

$db = dbx_connect("mysql", "localhost", "username", "password"); // works
$result = dbx_query($db, "use dbname"); // works
$q = dbx_query($db, "select id from tbl"); // works

// now I have the results in a 2D array, q->data[row][col]
// where col can be either an index or a fieldname
echo $q->data[0][0]; // works, displays first returned id, say 17
echo $q->data[0]["id"]; // works, displays first returned id (17)

// now I want to change the first returned id...
$q->data[0][0] = 12345;

// what I want is that the next two lines BOTH reflect the change
echo $q->data[0][0]; // works, displays changed id (12345)
echo $q->data[0]["id"]; // doesn't work like I would like, still displays
first returned id (17)

// This is the same behaviour that you get when you use the mysql-functions 
// directly, so no help there... (you can still combine these functions with
the 
// mysql-functions, if needed, like 
$fieldtype = mysql_field_type($q->handle, 0); 
// )

$result = dbx_close($db); // works ( $result = mysql_close($db->handle);
works too, BTW )


Currently I don't think this can be done the way I would like it to work.
Can anybody contradict me on this?

Cheerio, Marc.

-- 
PHP Development 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