Data Structures | |
class | zQuery |
class | zQueryRowSet |
Copyright (C) 2008 Neel Basu (Sunanda Bose)
Zigmoyd PHP Framework is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Zigmoyd PHP Framework is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with Zigmoyd PHP Framework. If not, see <http://www.gnu.org/licenses/>.
Executes a SQL query and returns the result. doesn't have any relation with ORM layers. i.e. zQuery does not uses any thing from zOrm_magic, zOrm_nomagic, zOrm_base or zOrm_core Class. However it uses the same driver that the Orm layers uses.
$q = new zQuery('conAliasName'); //Pass the connection file Name against which the query will be executed. $q->exec('select * from student'); $rowSet = $q->export();//Now $rowSet Represents the Result Returned. $n = $q->numRows() $q->exec("insert into student values(1, 'foo', 'bar')"); $n = $q->affectedRows();