This is very Oracle Pro*C specific and not portable. After coding in Pro*C in a previous incarnation, I don't really want think I want to do it this way again for every database.
==================== "Fabwash" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, I was wondering if this was discussed before. Having embedded sql in php source. The idea would be to have something like this: <?php $d = 1; EXEC SQL SELECT a,b,c INTO :vara, :varb, :varc FROM table WHERE d = :d; printf ("Found vara = %s, varb = %s, varc = %s", $vara, $varb, $varc"); // another example with a cursor: EXEC SQL DECLARE mycursor FOR SELECT a,b,c FROM table WHERE d IS NULL; ... EXEC SQL OPEN mycursor; EXEC SQL FETCH mycursor INTO :vara, :varb, :varc; if ($vara == "foo") { more php code } etc.. The EXEC SQL statements would generate API calls that could be used by drivers for the different databases like mysql, oracle, or whatever. An EXEC SQL statement would have to be invented to select the type of database you want to communicate with, give login information, etc.. Was that discussed before? Fab. -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php