Welcome Guest, Not a member yet? Register   Sign In
[Need help] Fatal error: Call to a member function num_rows() on a non-object
#21

[eluser]WanWizard[/eluser]
Did you check if the variable you use to store the result actually contains a result object? There are cases (p.e. when an error occured, or caching is enabled), when a boolean value is returned instead.
#22

[eluser]starfish76[/eluser]
Well i followed the instructions that i got with the script files, but i am new to all of this and have no clue what to do, if i gave you my ftp information would you be able to have a quick look? of course i'd pay for your time if i can get it finished.
#23

[eluser]WanWizard[/eluser]
You've got PM.
#24

[eluser]starfish76[/eluser]
Thank you! i pm'd you back
#25

[eluser]starfish76[/eluser]
I just want to say a HUGE HUGE thank you to WanWizard for his/her help, after afew hours of configuring my files its all up and running because of his/her commitment in helping others, so i recommend this amazing person if anyone else has any problems because i wouldn't had been able to get my site up and running if it wasn't for WanWizard

So THANK YOU once again (:
#26

[eluser]Seyed[/eluser]
@WanWizard and @ starfish76 : Can you people tell me how to fix this problem.. I am also facing the same problem.

Waiting for your prompt reply..

Many Thanks
#27

[eluser]WanWizard[/eluser]
Check if your database connection is up and running. You get this error if you don't have a connection, but still try to use $this->db functions.
#28

[eluser]Seyed[/eluser]
<?php

/**
* User Model
*
*
* @copyright Copyright © 2008 [x-MoBiLe] Nulled
* @license
* @since 1/2/2008
*/
class Applicationmodel extends Model
{
//Constructor
function Applicationmodel()
{
parent::Model();
}
function getApplications($onlyBasic = false)
{
if ($onlyBasic == true) $appQuery = $this->db->query(‘SELECT * FROM applications WHERE user_id=0’);
else $appQuery = $this->db->query(‘SELECT * FROM applications’);
echo “”;print_r($appQuery);echo” </pre>”;
if ($appQuery->num_rows() > 0)
{
$applications = array();
foreach ($appQuery->result_array() as $appRow)
{
$applications[$appRow[‘application_id’]] = $appRow;
}
return $applications;
}
else return false;
}
function getUserApplications()
{
$this->db->select(‘application_ids’);
$this->db->where(‘user_id’, $this->session->userdata(‘user_id’));
$this->db->limit(1, 0);
$userAppQuery = $this->db->get(‘users_applications’);
if ($userAppQuery->num_rows() > 0)
{
$userAppRow = $userAppQuery->result_array();
$appQuery = $this->db->query(‘SELECT * FROM applications WHERE application_id IN (’ . $userAppRow[0][‘application_ids’] . ‘)’);
if ($appQuery->num_rows() > 0)
{
$applications = array();
foreach ($appQuery->result_array() as $appRow)
{
$applications[$appRow[‘application_id’]] = $appRow;
}
return $applications;
}
else return false;
}
else return false;
}
function isApplication($appName)
{
$this->db->where(‘application_name’, $appName);
$this->db->limit(1, 0);
$appQuery = $this->db->get(‘applications’);
if ($appQuery->num_rows() > 0)
{
$appRow = $appQuery->result_array();
return $appRow[0][‘application_id’];
}
else return false;
}
function isUserCanAccessTheApplication($applicationId)
{
$this->db->select(‘application_ids’);
$this->db->where(‘user_id’, $this->session->userdata(‘user_id’));
$this->db->limit(1, 0);
$userAppQuery = $this->db->get(‘users_applications’);
if ($userAppQuery->num_rows() > 0)
{
$userAppRow = $userAppQuery->result_array();
$userAppArray = explode(’,’, $userAppRow[0][‘application_ids’]);
if (array_search($applicationId, $userAppArray) === false) return false;
else return true;
}
else return false;
}
function getLanguages()
{
$this->db->select(‘lang_code, lang_name’);
$this->db->from(‘languages’);
$langQuery = $this->db->get();
$languages = array();
if ($langQuery->num_rows() > 0)
{
foreach ($langQuery->result_array() as $langRow)
{
$languages[] = $langRow;
}
}
return $languages;
}
}

?&gt;

This is the code page. Everything is fine. But still that error exists.
#29

[eluser]InsiteFX[/eluser]
Please use the code tags when submitting code!

InsiteFX
#30

[eluser]Seyed[/eluser]
Guys iam waiting for your reply...

I think someone already got a solution to this problem.




Theme © iAndrew 2016 - Forum software by © MyBB