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.

mysql error......

Discussion in 'MySQL' started by mohammadi, Jun 4, 2011.

  1. #1
    I've install an mp3 script at my site but my site shown a mysql error so how to resolve it,,, please see the below link & help me...


    http://www.room.pk/mp3/search/mp3/1/ready.html
     
    mohammadi, Jun 4, 2011 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    This is because your MySQL query has problem. It was not successfully executed and returned invalid resource.
     
    mwasif, Jun 4, 2011 IP
  3. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    so how to resolve it.....
     
    mohammadi, Jun 5, 2011 IP
  4. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #4
    Fix your query....
     
    mwasif, Jun 5, 2011 IP
  5. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    can you let me know the step by step b'coz i'm new in this.....
     
    mohammadi, Jun 5, 2011 IP
  6. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    dear,
    no i've try at my another domain but have same prob....

    http://hungamapk.com/search/mp3/1/mast+mast.html
    Code (markup):
     
    mohammadi, Jun 5, 2011 IP
  7. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #7
    Post the query that you are running just before this line.
     
    mwasif, Jun 5, 2011 IP
  8. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    please know me the step by step which line ....... my function file is.....
     
    mohammadi, Jun 5, 2011 IP
  9. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #9
    Sorry, I can not read all the file. Post the lines from 160 to 181.
     
    mwasif, Jun 5, 2011 IP
  10. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    ok no prob..... but which query i put in....
     
    mohammadi, Jun 5, 2011 IP
  11. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #11
    Post here the lines of code from line 160 to line 181.
     
    mwasif, Jun 5, 2011 IP
  12. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    now line 158 to 181 here.........
     
    mohammadi, Jun 5, 2011 IP
  13. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #13
    Change this line for debugging
    if(mysql_num_rows(mysql_query($query))==0){
    Code (markup):
    to
    $rs = mysql_query($query) or die("Error in query: ".mysql_error());
    if(mysql_num_rows($rs)==0){
    Code (markup):
    Post here what your got in the page now
     
    mwasif, Jun 5, 2011 IP
  14. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    mohammadi, Jun 5, 2011 IP
  15. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    asif,,, after add your reply....... plz inform me at 03232010307 through sms.....................
     
    mohammadi, Jun 5, 2011 IP
  16. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #16
    It seems that your script is providing limit in -ve numbers. To confirm this make a little more modification and replace the line
    $rs = mysql_query($query) or die("Error in query: ".mysql_error());
    with
    $rs = mysql_query($query) or die("Query: $query <br> Error: ".mysql_error());
     
    mwasif, Jun 5, 2011 IP
  17. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17

    nop solved....... check this http://hungamapk.com/search/mp3/1/tarap.html
     
    mohammadi, Jun 5, 2011 IP
  18. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #18
    This query is wrong
    SELECT * FROM downloads WHERE title || artist LIKE '%%' ORDER BY id DESC LIMIT [B]-10[/B], 0
    Code (markup):
    LIMIT should be +ve. It can't be -ve.

    This line is the problem
    $start = RESULTS_LIMIT * ($page-1);
    Code (markup):
     
    mwasif, Jun 5, 2011 IP
  19. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    so what i do.............how to resolve it..........
     
    mohammadi, Jun 5, 2011 IP
  20. mohammadi

    mohammadi Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    asif,,,, thanks for your support my this problem is solved now....
     
    mohammadi, Jun 5, 2011 IP