Thank you for your comments Bill, I've made a few modifications, however, to
be honest currently there was no real need for it as the getQueryParams()
does not report anything for any of my queries.
On Wed, Jun 18, 2008 at 6:03 PM, Bill Karwin <[EMAIL PROTECTED]> wrote:
>
>
>
> Isaak Malik-3 wrot
Isaak Malik-3 wrote:
>
> Here's my debug template which uses the ZFW DB profiler:
>
> http://paste2.org/p/40615
>
> Use it and/or copy anything you like.
>
Good, you have kept the query separate from the query parameters.
Minor comment: implode(',', $QDetails->getQueryParams()) muddles th
dbowen wrote:
>
> $q = str_replace('?', '%s', $query->getQuery());
>
> This gives me the actual queries with the replaced values highlighted.
>
Your str_replace() solution above doesn't support named parameters, and also
fails if you have ques
Here's my debug template which uses the ZFW DB profiler:
http://paste2.org/p/40615
Use it and/or copy anything you like.
On Wed, Jun 18, 2008 at 4:28 PM, dbowen <[EMAIL PROTECTED]> wrote:
>
>
> Mark Steudel-3 wrote:
> >
> > Hi All,
> >
> >
> >
> > I was wondering if it was possible to get back
Mark Steudel-3 wrote:
>
> Hi All,
>
>
>
> I was wondering if it was possible to get back the last run query
> including
> the values that get swapped in place of the ?
>
>
>
> E.g. if I did:
>
> $id = 4;
>
>
>
> $sql = "SELECT id FROM table WHERE id = ?";
>
>
Mark Steudel-3 wrote:
>
> Is there a way outsde of the profiler to get the sql string with parameter
> values? like the select __toString() method?
>
No, this information is not synthesized anywhere in Zend_Db classes, because
it would be wrong.
Regards,
Bill Karwin
--
View this message in
-> last query with values
Mark Steudel-3 wrote:
>
> I was wondering if it was possible to get back the last run query
> including
> the values that get swapped in place of the ?
>
> I tried using the profiler, but it just gives me back the sql statement
> before
Mark Steudel-3 wrote:
>
> I was wondering if it was possible to get back the last run query
> including
> the values that get swapped in place of the ?
>
> I tried using the profiler, but it just gives me back the sql statement
> before $id gets passed into it.
>
Zend_Db_Profiler has a funct
Hi All,
I was wondering if it was possible to get back the last run query including
the values that get swapped in place of the ?
E.g. if I did:
$id = 4;
$sql = "SELECT id FROM table WHERE id = ?";
$rows = $this->db->fetchAll( $sql, $id );
echo $this->db-