$dbproc->dbcmd($the_sql_cmd);
# possibly add more commands to the SQL buffer with additional
# dbcmd() calls
# Send the command(s) to the server
$dbproc->dbsqlexec;
# Process all the results
while($dbproc->dbresults != NO_MORE_RESULTS) {
# Process any rows that might be returned:
while(@data = $dbproc->dbnextrow) {
..... # do something with the data
}
}
What you need to realize is that for each INSERT, UPDATE, etc. in your SQL buffer you must call dbresults() at least once - hence the loop until dbresults() returns NO_MORE_RESULTS.
Michael
|