logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: ResultSet empty when running execute query on a prepared statment: msg#00013

Subject: Re: ResultSet empty when running execute query on a prepared statment
Does the metadata update have anything to do with multiple calls to
getColumns() failing?

Otherwise I may have to look into this one as well.

Jay

On Apr 12, 2005 2:42 PM, Hans Lellelid <hans@xxxxxxxxx> wrote:
> Hi Jay,
> 
> Ok -- I think there is a newer version.  You may wish to try that first.
>   Really it's a bugfix release. The only more substantial changes
> involved the metadata stuff, and there too should just be improvements.
>   So you should be safe doing:
> 
> $> pear upgrade http://creole.phpdb.org/pear/creole-current.tgz
> 
> You can always downgrade if you run into trouble:
> 
> $> pear uninstall creole
> $> pear install http://creole.phpdb.org/pear/creole-1.0.0.tgz
> 
> Let me know if you still have this trouble after upgrading.
> 
> Thanks,
> Hans
> 
> Jay Baird wrote:
> > Hans,
> >
> > Let me get you the *exact* error that returns.. so standby..
> >
> > Creole revision is marked as 1.8 internally.. It's what I got from
> > creole-current.tgz through PEAR about a week maybe two weeks ago.
> >
> > Here it is, using the following code:
> >
> > $results = $conn->executeQuery($sql);
> > foreach($results as $row) {
> >      .. do stuff
> > }
> >
> > and the error:
> >
> > Warning:  sqlite_next() [function.sqlite-next]: no more rows available
> > in /usr/local/php5/lib/php/creole/drivers/sqlite/SQLiteResultSetIterator.php
> > on line 56
> >
> >
> > On Apr 12, 2005 2:21 PM, Hans Lellelid <hans@xxxxxxxxx> wrote:
> >
> >>Damn .... is this with 1.0.1 ?  I know there were some optimizations to
> >>the SQLite iterator.  Perhaps a bug slipped through.
> >>
> >>I'll have a look at this tonight.
> >>
> >>Thanks,
> >>Hans
> >>
> >>Jay Baird wrote:
> >>
> >>>Well, I'm using the SPL with foreach and it's returning that there are
> >>>no more rows.
> >>>
> >>>The SPL extension is installed, and the usual ResultSet->next() way is
> >>>working properly, I just can't use foreach().
> >>>
> >>>On Apr 12, 2005 11:23 AM, Hans Lellelid <hans@xxxxxxxxx> wrote:
> >>>
> >>>
> >>>>Hi Jay,
> >>>>
> >>>>Jay Baird wrote:
> >>>>
> >>>>
> >>>>>Hello,
> >>>>>
> >>>>>I'm creating a simple access object for persistence and am using a
> >>>>>rudimentary query builder for running select statments. Below is the
> >>>>>code that generates the select:
> >>>>>
> >>>>>$where is an array holding the column names and their values.
> >>>>>
> >>>>>$i = 0;
> >>>>>$query = "SELECT * FROM " . $this->_internal["table_name"] . " WHERE ";
> >>>>>
> >>>>>foreach($where as $key => $value) {
> >>>>>   $i == (count($where) - 1) ? $query .= "$key=?" : $query .= "$key=? 
> >>>>> AND ";
> >>>>>   $i++;
> >>>>>}
> >>>>>
> >>>>>then I call $connection->executeQuery($where);
> >>>>>
> >>>>>I've added some debugging code to PreparedStatementCommon.php to print
> >>>>>out my exact sql query being sent to the database and in taking that
> >>>>>statement I run it on the db's console and the query works, but inside
> >>>>>my program there is nothing in the result set.
> >>>>>
> >>>>>The query reads:
> >>>>>"SELECT * FROM node WHERE author_id=33 AND
> >>>>>work_url='http://www.google.com' AND narrative='Now is the time for
> >>>>>all good men to come to the aid of their country.'"
> >>>>>
> >>>>>Testing database is SQLite 2.8.
> >>>>
> >>>>Hmmm -- could you provide some example of how you're working with your
> >>>>ResultSet.  Perhaps this is a dumb question, but are you first doing
> >>>>$rs->next() before attempting to access stuff?  (I forget that sometimes
> >>>>and wonder why it's empty.)
> >>>>
> >>>>-Hans
> >>>>
> >>>>---------------------------------------------------------------------
> >>>>To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxx
> >>>>For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxx
> >>>>
> >>>>
> >>>
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxx
> >>>For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxx
> >>>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxx
> >>For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxx
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxx
> > For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxx
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxx
> For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxx
> 
>



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>