TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 02-26-2011, 06:38 AM   #1 (permalink)
The Visitor
 
Keinstah's Avatar
 
Join Date: Feb 2011
Posts: 2
Thanks: 0
Keinstah is on a distinguished road
Default num rows

hello im new here and im getting this error
Fatal error: Call to a member function execute() on a non-object in PATH......

im using this class to get the num rows please correct me
PHP Code:
public function prepareDB($query NULL) {
        
$prepare $this->mysqli->prepare($query);
        return 
$prepare;
        }
    
    public function 
numDB($query NULL) {
        
$this->stmt $this->prepareDB($query);
        
$this->stmt->execute();
        
$this->stmt->store_result();
        
$num $this->stmt->num_rows;
        
$this->stmt->close();
        return 
$num;
        } 
PHP Code:
$query "SELECT * WHERE smthng='value'";
$num $Database->numDB($query);

echo 
$num
thx.
Keinstah is offline  
Reply With Quote
Old 03-13-2011, 09:12 AM   #2 (permalink)
The Visitor
 
Keinstah's Avatar
 
Join Date: Feb 2011
Posts: 2
Thanks: 0
Keinstah is on a distinguished road
Default

cool 2.5k+ views with no reply :D
anyway i Solved it already
Keinstah is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[PHP/MySQL] Function to return ALL selected rows maZtah General 7 10-22-2012 09:41 AM
Filling an array with values from a single column over specific rows in MySQL DB gj384 Absolute Beginners 2 11-11-2010 09:45 PM
Checkboxes and db rows Dave Absolute Beginners 7 02-28-2010 08:09 PM
How to get row number from 2 top numberd rows ttmtake General 5 01-28-2009 11:16 PM
how to get the rows affected(not number of rows) kororo203 Absolute Beginners 2 04-23-2008 08:32 AM


All times are GMT. The time now is 04:38 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design