Welcome Guest, Not a member yet? Register   Sign In
PROBLEM WITH DB QUERIES
#1

[eluser]ReSTe[/eluser]
Hi all, i'm newbie about codeigniter, i'm developing an application for my 3rd year thesis at politecnico Milano... i have a question:

here is my code:

$user=$_POST["user"];
$pass=$_POST["password"];
$query = "select * from operatore where user='$user' and password= '$pass'";
$result=$this->db->query($query);
//echo "$query[nome]";
if($result->num_rows() > 0)
echo"ASDASD";


and i see this error:

Fatal error: Call to a member function num_rows() on a non-object in C:\www\codeigniter\CodeIgniter_1.5.4\system\application\controllers\tmfmagenta.php on line 31

(it's on $result variable)


WHY?!?!?!?!?!?!?!?


Messages In This Thread
PROBLEM WITH DB QUERIES - by El Forum - 07-18-2007, 09:03 AM
PROBLEM WITH DB QUERIES - by El Forum - 07-18-2007, 12:21 PM
PROBLEM WITH DB QUERIES - by El Forum - 07-18-2007, 06:34 PM
PROBLEM WITH DB QUERIES - by El Forum - 07-19-2007, 02:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB