www.webdeveloper.com
Results 1 to 2 of 2

Thread: fata error

  1. #1
    Join Date
    Jun 2008
    Posts
    106

    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
    Location
    Ankh-Morpork
    Posts
    19,176
    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

    eBookworm.us

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



Recent Articles