Fatal error: Call to a member function fetchrow() on a non-object in C:\xampp\ht


Posted on 16th Feb 2014 07:03 pm by admin

okay i have this query and everytime i add `item_id`=? to it... it gives me the error in the title...


Code:
$query = $db->execute("select * from items where `player_id`=?, `item_id`=?", array($player->id, 1));
$item = $query->fetchrow();


//if 1 or more rows are found then update Quantity.
if ($query->recordcount() >= 1){


any ideas?

No comments posted yet

Your Answer:

Login to answer
125 Like 16 Dislike
Previous forums Next forums
Other forums

Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently

PHP5/Zend 2.0 - Resources
PHP5 Snapshots
http://snaps.php.net/

ZEND 2.0 Feature Overview and Design (PDF File

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

session variable problem
Session variable is not working in Fire fox i am getting null value but it is working fine in IE.

Connect to database that isn't localhost
I am currently doing a small script for a company that doesn't have mySql support on there hosting.

Strange array issue, never happened before.
mysql_fetch_array returns 1 array per call. Generally that's why it is inserted into a while statem

Need help with a mail notify function
I was tasked with setting up a site that's been prewritten. The site is basically a form that captur

Simple MySQL script is not working
Hey guys,

Just familiarizing myself with PHP and MySQL. I am following along in the O'Reilly

Object Interfaces
EDIT: Never mind, I just updated to php 5.

Hey all,

I'm currently experimenting with p

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash