Mysql_fetch_array() argument error

Discussion in 'MySQL' started by hhheng, Nov 5, 2007.

  1. #1
    The following works fine in another server, but doesn't work on my Godaddy.com server. I'm using this script to show a list in several pages, and the max_listing is from config.php.

    If I remove the LIMIT $start, $max_listing or replace with LIMIT 0, 100, it will be working.

    Can anybody tell me what's wrong with this?
     
    hhheng, Nov 5, 2007 IP
  2. eli03

    eli03 Well-Known Member

    Messages:
    2,887
    Likes Received:
    98
    Best Answers:
    0
    Trophy Points:
    175
    #2
    try adding quote just like on $sort_name . LMIT '".$start."','".$max_listing."' .
     
    eli03, Nov 5, 2007 IP
  3. hhheng

    hhheng Banned

    Messages:
    2,633
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's not working like that. I tried it with the same errors.
     
    hhheng, Nov 5, 2007 IP
  4. ndreamer

    ndreamer Guest

    Messages:
    339
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #4
    try doing what the above poster said but reverse it! remove the quotes from $sort_name as you are not passing a string you are passing the name of a field.

     
    ndreamer, Nov 5, 2007 IP
  5. Kuldeep1952

    Kuldeep1952 Active Member

    Messages:
    290
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Add a line

    echo $list;

    and see what $list contains. Then try to run the same in phpmyadmin
     
    Kuldeep1952, Nov 5, 2007 IP
  6. hhheng

    hhheng Banned

    Messages:
    2,633
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #6
    ndreamer, you are right, and the problem solved. Thanks above!
     
    hhheng, Nov 6, 2007 IP