Click here to Skip to main content
15,503,456 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: what is the error : SQL syntax; check the manual that corresponds to your MariaDB server version? Pin
Amir karim3-Apr-19 22:24
Amir karim3-Apr-19 22:24 
GeneralRe: what is the error : SQL syntax; check the manual that corresponds to your MariaDB server version? Pin
Richard Deeming3-Apr-19 23:28
mveRichard Deeming3-Apr-19 23:28 
QuestionStored procedure is needed Pin
Member 1246113225-Mar-19 5:02
Member 1246113225-Mar-19 5:02 
AnswerRe: Stored procedure is needed Pin
Richard MacCutchan25-Mar-19 6:40
mveRichard MacCutchan25-Mar-19 6:40 
QuestionHow to call php divisions by a button click Pin
Member 1417791010-Mar-19 23:54
Member 1417791010-Mar-19 23:54 
QuestionDEVELOPING WEB FORM Pin
Member 1402329817-Oct-18 6:40
Member 1402329817-Oct-18 6:40 
AnswerRe: DEVELOPING WEB FORM Pin
Mycroft Holmes17-Oct-18 13:43
professionalMycroft Holmes17-Oct-18 13:43 
QuestionWhy my field returns boolean instead of object? Pin
Member 1399562824-Sep-18 4:12
Member 1399562824-Sep-18 4:12 
Hi. I'm new at php oop, and I have a question.

I have this method in my class:

PHP
public function find($user = null) {
		if ($user) {
			$field = (is_numeric($user)) ? 'id' :'username';
			$data = $this->_db->get('users', array($field, '=', $user));
			//var_dump($data);
			//die();

			if ($data->count()) {
				
				$this->_data = $data->first();
				return true;
			}
		}
		return false;
	}


When I call class function count() I got message:

Call to a member function count() on a non-object


I understand that $data isn't an object:
var_dump($data); returns boolean false????
AnswerRe: Why my field returns boolean instead of object? Pin
Graham Breach24-Sep-18 4:48
Graham Breach24-Sep-18 4:48 
GeneralRe: Why my field returns boolean instead of object? Pin
Member 1399562824-Sep-18 4:50
Member 1399562824-Sep-18 4:50 
GeneralRe: Why my field returns boolean instead of object? Pin
Graham Breach24-Sep-18 5:57
Graham Breach24-Sep-18 5:57 
AnswerRe: Why my field returns boolean instead of object? Pin
SiFinances28-Oct-18 1:52
SiFinances28-Oct-18 1:52 
Questionhow to find daily cash book record from two tables with php mysql Pin
Faruk Web10-Aug-18 22:46
Faruk Web10-Aug-18 22:46 
QuestionGet data attribute from an array of select box Pin
Member 85505912-Aug-18 17:23
Member 85505912-Aug-18 17:23 
QuestionHow to allow access to a yii web application for specific users using .htaccess Pin
Member 139352712-Aug-18 0:20
Member 139352712-Aug-18 0:20 
AnswerRe: How to allow access to a yii web application for specific users using .htaccess Pin
Richard MacCutchan2-Aug-18 1:40
mveRichard MacCutchan2-Aug-18 1:40 
AnswerRe: How to allow access to a yii web application for specific users using .htaccess Pin
Richard MacCutchan2-Aug-18 2:31
mveRichard MacCutchan2-Aug-18 2:31 
GeneralRe: How to allow access to a yii web application for specific users using .htaccess Pin
Member 139352712-Aug-18 2:35
Member 139352712-Aug-18 2:35 
GeneralRe: How to allow access to a yii web application for specific users using .htaccess Pin
Richard MacCutchan2-Aug-18 4:49
mveRichard MacCutchan2-Aug-18 4:49 
GeneralRe: How to allow access to a yii web application for specific users using .htaccess Pin
Member 1393527114-Aug-18 2:02
Member 1393527114-Aug-18 2:02 
GeneralRe: How to allow access to a yii web application for specific users using .htaccess Pin
Member 1393527114-Aug-18 2:02
Member 1393527114-Aug-18 2:02 
QuestionHow Can I Start Learning PHP Pin
Andre Hoss3-Jul-18 8:03
Andre Hoss3-Jul-18 8:03 
AnswerRe: How Can I Start Learning PHP Pin
Richard MacCutchan3-Jul-18 9:27
mveRichard MacCutchan3-Jul-18 9:27 
AnswerRe: How Can I Start Learning PHP Pin
Member 1501179923-Dec-20 8:29
Member 1501179923-Dec-20 8:29 
Questionphp-mysql Pin
Raja Jee2-Jul-18 19:38
Raja Jee2-Jul-18 19:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.