For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > February 2008 > Mysqli returning result set from a function to calling script









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Mysqli returning result set from a function to calling script
Radek Zajkowski

2008-02-09, 7:00 pm

Hi all,

we've trying to write a wrapper class that would execute a prepared
statement and return obtained dataset/resultset to the calling script.

It would:

1. Prepare statement
2. execute
3. call something like $stmt->store_result(); (which we could assing
to a var or return)
4. return the results set

however, there seems to be no method or property representing tables
inside the $stmt var

In .NET, for example (please don't spit), you can get at the results by
accessing e.g. DataSet.Tables["TableName"].

How do we do that in PHP5?

Many thanks,

Radek.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com