This is what I have.. I think it's along the same lines as what you are
asking.. If not, just ignore my drunken ramblings.. It isn't with oci stuff
but if it's similar to what you need then you should be able to convert it
$result = $database->query( "SELECT * FROM contacts WHERE cartId='$cartId'
ORDER BY lastName, firstName" );
while( $data = $database->fetchRow( $result ) )
echo( "<tr><td>$data->lastName, $data->firstName</td><td><a
Now from what I understand of your question, you could remove the while so
you had $data = $database->fetchRow( $result ); then use if() tests to
compare $data->varName values.. If you wanted to compare values in different
rows, then I guess you could leave the while loop and just replace the
echo() with your if() tests..
Sorry if I missed the point of your question.. I hope this helps though..
"Pusta" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am really new at this PHP stuff, so please go easy on me. I am trying
> query the database and then store the result of the query into a variable
> compare to another variable. This is for a login function so for example:
> $c1 = ociparse($db, "select ssn from schema.table where ssn = $password");
> my question is how can I store what's in the field ssn into a variable?
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php