Hi i am trying to display all dats from the database
if i use like his
$query = "SELECT A.categ_id,categ_name,course_id,course_name,course_short_desc,course_desc,course_hrs,course_rate_inr ,course_rate_usd FROM inetworkz_tbl_course_category A,inetworkz_tbl_course B where A.categ_id=B.categ_id and B.act_ind='A' order by categ_id,course_id ";
$sth = $mydatabase->query($query);
while($row = $sth->fetchRow(DB_FETCHMODE_ORDERED))
error PHP error :Call to a member function query() on a non-object like this
Please help me how to solve this
It's telling you that $mydatabase is not an object. Either you've typed its name wrong (it's case-sensitive), you never defined it, or it's instantiation failed.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)