Thread: SQL error 1064

Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,450
    Rep Power
    1751
    Originally Posted by bobskiny
    well i had this code which had was not executing properly and kept giving me an error saying resource needed, boolean given whihc was on line 52 whihc was the last line in my previous entry;
    $row_num_links_main =mysql_num_rows ($numresults)

    and i saw a youtube video which said the problem was not actualy with this line and was infact with the line i put before;
    $query = "SELECT * , MATCH (firstname, lastname) AGAINST ('".$trimm."') AS score FROM Trophies WHERE MATCH (firstname, lastname) AGAINST ('+".$trimm."') ORDER BY score DESC";

    and he said to put this into phpmyadmin on the sql tab and then it will show you what the mistake is so i did this and still couldnt figure out what the mistake was and that is why i asked on this forum

    the only difference i see between the two methods is that the phpmyadmin gives you more of a clue as to where the mistake is, but i just really need some help because i dont really have clue about what i am doing. i dont have the time to learn the language properly right now as i did HTML and CSS
    Ironically, that code DOES contain the 'missing' comma.
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc
  2. #17
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    10
    Rep Power
    0
    okay thankyou i will try this later when i am back at my computer and post what happens after, thank you for helping me sorry if i am an annoying you
  4. #18
  5. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,204
    Rep Power
    4279
    no, you are not annoying us

    you are providing us with an interesting challenge to see if we can explain what to us is a fairly simple concept in terms that will lead you to the same understanding

    Comments on this post

    • cafelatte disagrees : I'm a teensy weensy bit exasperated! :-)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  6. #19
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    10
    Rep Power
    0
    I tried and this is the line i got;

    SELECT * FROM Trophies WHERE firstname LIKE '%%' OR lastname LIKE '%%' ORDER BY field3 DESC

    do you know what happened i think my variable is not working but i dont know what to do about it
  8. #20
  9. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,204
    Rep Power
    4279
    Originally Posted by bobskiny
    do you know what happened i think my variable is not working but i dont know what to do about it
    i don't, but the guys in the php forum will...

    moving thread to php forum
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  10. #21
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    10
    Rep Power
    0
    okay thank you for your help
  12. #22
  13. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,549
    Rep Power
    2337
    Need to see the PHP code that generates this query:

    Code:
     SELECT * FROM Trophies WHERE firstname LIKE '%%' OR lastname LIKE '%%' ORDER BY field3 DESC
    I ♥ ManiacDan & requinix

    This is a sig, and not necessarily a comment on the OP:
    Please don't be a help vampire!
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo