Results 1 to 2 of 2

Thread: fata error

  1. #1
    Join Date
    Jun 2008

    fata error

    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))

    Is showing

    error PHP error :Call to a member function query() on a non-object like this

    Please help me how to solve this

  2. #2
    Join Date
    Aug 2004
    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.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center