Activity Stream
48,167 MEMBERS
6637 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 33
  1.     
    #11
    Member
    i'm not real smart but try to help. also got this error once ago and solved. try changing into another name instead 'like' on your db. it's a reserved word. don't forget to change the name on php too. regard.

    edit: i mean 'like' on column name of 'fblike' table, not on the db name
    gomu gomu no..

    ..flying fuck!

  2.   Sponsored Links

  3.     
    #12
    OH GOD!!!!!
    Website's:
    HotNewHipHop.com
    Quote Originally Posted by litewarez View Post
    lol your Query is wrong

    PHP Code: 
    $x mysql_query('SELECT * FROM fblike ORDER BY id DESC LIMIT  0,1');

    //Try dump out whit it is, using the code below
    var_dump($x); //See if it comes back as a resource. 
    if it returns (bool) false then the table fblike does not exists or the column id does not exist.
    i tried it and it returned (bool) false

    the database is there so is the table fblike
    so idk wtfak is wrong

  4.     
    #13
    The Wise One
    Website's:
    twilight.ws ddlrank.com
    Before you do something with the $x, and after the query, add this:

    PHP Code: 
    if(mysql_num_rows($x)){
      
    //Do your stuff
    }else{
      
    //No results found

    I can always be contacted by sending a tweet @twilightws

  5.     
    #14
    Respected Member
    That won't help except to say there is an error/empty just like the var_dump did.

    replace
    var_dump($x);
    with
    if (mysql_error()){echo "<br>Error on fblike table: ".mysql_error();}

  6.     
    #15
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    No dont do all that, whoo your wrong, you cant count the rows if mysql_result returns false;

    Copy the query and run it within phpMyAdmin and send us the error. IF there is no error, make sure your selecting the correct db in your config.
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  7.     
    #16
    OH GOD!!!!!
    Website's:
    HotNewHipHop.com
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$x = mysql_query('SELECT * FROM fblike ORDER BY id DESC LIMIT 0,1')' at line 1

  8.     
    #17
    Respected Developer
    Website's:
    wrzc.org
    Quote Originally Posted by bxflow View Post
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$x = mysql_query('SELECT * FROM fblike ORDER BY id DESC LIMIT 0,1')' at line 1
    The only part you run in PHPmyadmin is
    Code: 
    SELECT * FROM fblike ORDER BY id DESC LIMIT 0,1


    Anyway a bit offtopic but you should escape this and make it safe:
    PHP Code: 
    $like=$_POST["like"]; 
    PHP Code: 
    $like=mysql_real_escape_string($_POST["like"]); 
    It will help prevent hacking and make your script safer.

    More info here http://php.net/manual/en/function.my...ape-string.php
    Tutorial How to SEO your Warez Site a guide to help you increase your organic traffic

    Huge list of Warez Sites and free Multiposter Templates

  9.     
    #18
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    yea what he said.
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  10.     
    #19
    The Wise One
    Website's:
    twilight.ws ddlrank.com
    Quote Originally Posted by litewarez View Post
    No dont do all that, whoo your wrong, you cant count the rows if mysql_result returns false;

    Copy the query and run it within phpMyAdmin and send us the error. IF there is no error, make sure your selecting the correct db in your config.
    Using the code I have given it won't do anything if the result is 0 , but yeah it won't help fixing a error in the query.
    I can always be contacted by sending a tweet @twilightws

  11.     
    #20
    OH GOD!!!!!
    Website's:
    HotNewHipHop.com
    Quote Originally Posted by Mr Happy View Post
    The only part you run in PHPmyadmin is
    Code: 
    SELECT * FROM fblike ORDER BY id DESC LIMIT 0,1
    Anyway a bit offtopic but you should escape this and make it safe:
    PHP Code: 
    $like=$_POST["like"]; 
    PHP Code: 
    $like=mysql_real_escape_string($_POST["like"]); 
    It will help prevent hacking and make your script safer.

    More info here http://php.net/manual/en/function.my...ape-string.php

    thanx,


    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''SELECT * FROM fblike ORDER BY id DESC LIMIT 0,1' at line 1

Page 2 of 4 FirstFirst 1234 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MySQL Error
    By KINGTHE_ALI in forum Webmaster Discussion
    Replies: 4
    Last Post: 17th Nov 2011, 05:40 PM
  2. Database error-mysql error
    By saini in forum vBulletin
    Replies: 8
    Last Post: 8th Nov 2011, 06:54 AM
  3. MYSQL Error while Import via MYSQL Dumper (Error
    By desibreaker in forum Server Management
    Replies: 10
    Last Post: 5th Aug 2011, 07:26 PM
  4. MySQL Error
    By II AnDo II in forum Web Application/Script Support
    Replies: 2
    Last Post: 17th Aug 2009, 08:45 PM
  5. MySQL error
    By mash-e1 in forum Webmaster Discussion
    Replies: 2
    Last Post: 28th Mar 2009, 12:12 PM

Tags for this Thread

BE SOCIAL