1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP error

Discussion in 'PHP' started by Buyer1seller, Jul 20, 2009.

  1. #1
    I am running site like watchmedia.net

    At comments area I facing this problem


    Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 50 in /home/quick/public_html/watchmedia.net/inc/mysql.class.php on line 33

    Please this there anyone to help me ?
     
    Buyer1seller, Jul 20, 2009 IP
  2. ractors

    ractors Well-Known Member

    Messages:
    1,979
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    140
    #2
    where u getting this error ?

    i fly around ur site and i didn't find any errors.

    Only lots of popup with clickser.
     
    ractors, Jul 21, 2009 IP
  3. Buyer1seller

    Buyer1seller Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    http://watchmedia.net/newcomments.html look at here its showing error
     
    Buyer1seller, Jul 21, 2009 IP
  4. ractors

    ractors Well-Known Member

    Messages:
    1,979
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    140
    #4
    check this line public_html/watchmedia.net/inc/mysql.class.php on line 33

    what is that line ?

    that is sql problem . Code not pulling data from sql.
     
    ractors, Jul 21, 2009 IP
  5. Buyer1seller

    Buyer1seller Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I didn't know but I am having that problem :(
     
    Buyer1seller, Jul 21, 2009 IP
  6. Buyer1seller

    Buyer1seller Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    function result($query,$num = 0)
    {
    $query = mysql_result($query,$num);
    return $query;


    here is that code on line 33
     
    Buyer1seller, Jul 21, 2009 IP
  7. ractors

    ractors Well-Known Member

    Messages:
    1,979
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    140
    #7
    change

    to this

    function result($query,$num = 1)
    {
    $query = mysql_result($query,$num);
    return $query;

    if not solved then i need to check ur database

    thx
     
    ractors, Jul 21, 2009 IP
  8. mioot

    mioot Peon

    Messages:
    169
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    you put @mysql_result($query,$num); it prevent from showing the warning.
     
    mioot, Jul 21, 2009 IP
  9. Martinoes

    Martinoes Peon

    Messages:
    110
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    mysql_result() will throw E_WARNING if mysql_query returns 0 rows, you must check if your query returns any data:

    mysql_num_rows($result)==0
     
    Martinoes, Jul 21, 2009 IP
  10. Buyer1seller

    Buyer1seller Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    :( no still showing error :(
     
    Buyer1seller, Jul 21, 2009 IP
  11. Martinoes

    Martinoes Peon

    Messages:
    110
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Write your SQL query and part of code that you are using when invoking result function.
     
    Martinoes, Jul 21, 2009 IP