0

I have a problem when using Zend classes db, sql and select. My users table has 10 rows but returns results only 1 line.

File Model:

public function DbFetchAll ($ table) {
     try {
         $ select = $ this -> _ sql-> select ();
         $ Select-> from ($ table);
         $ statement = $ this -> _ sql-> prepareStatementForSqlObject ($ select);
         $ result = $ statement-> execute () -> current ();
         return $ result;
     } Catch (Exception $ exc) {
         echo $ exc-> getMessage ();
     }

1 Answer 1

1

-> current (); returning current pointing record. Try removing it. It should work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.