Results 1 to 12 of 12
  1. #1

    MySQL database problem?

    Hi guys im pretty new at this so Im not sure what the error mean, I think my DB was deleted or something. Thank for any help you can provide.

    Warning: Failed to execute the query SELECT email_id FROM emails WHERE email_id = 'admin' AND domain_id = (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 '' at line 1) in /var/wkscript/db.php on line 75

  2. #2
    Im trying to post the DB file but im getting an error saying I need 5 posts before I can use board functions such as smileys lol wtf

  3. #3
    Join Date
    Mar 2009
    Posts
    2,218
    Quote Originally Posted by mikelawss View Post
    Hi guys im pretty new at this so Im not sure what the error mean, I think my DB was deleted or something. Thank for any help you can provide.

    Warning: Failed to execute the query SELECT email_id FROM emails WHERE email_id = 'admin' AND domain_id = (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 '' at line 1) in /var/wkscript/db.php on line 75
    I would guess from the message that there is no value for domain_id

    Just before the SELECT statement, put in some print statements to output the values of the variables used in it.

  4. #4
    Quote Originally Posted by tim2718281 View Post
    I would guess from the message that there is no value for domain_id

    Just before the SELECT statement, put in some print statements to output the values of the variables used in it.
    I really have no idea how to do that, I dont know much about Mysql, could you break it down a little further for me? I can email you the fil eif that would help. Thanks again

    Here is that block
    $db_dns->query("select id,name,layout from domains_data.domains where main_dom = 1");
    $main_doms = array();
    while($s=$db_dns->fetch_row()) {
    $main_doms[] = $s;

    Mike
    Last edited by mikelawss; 08-09-2009 at 09:58 PM.

  5. #5
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    2,955
    Can you provide the output of this SQL:

    desc domains_data.domains;

    Regards
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance
    www.unixy.net - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe > unixy.net

  6. #6
    Join Date
    Jul 2009
    Posts
    178
    is it the database which was in Mysql 4 and transfered to Mysql 5?

  7. #7
    Join Date
    Apr 2009
    Location
    whitehouse
    Posts
    656
    Are you able to execute the following query successfully in the mysql command line?
    Code:
    SELECT email_id FROM emails WHERE email_id = 'admin' AND domain_id =1
    if yes we could rule out an issue with the sql server and the problem could be with the query generated by your php code.
    James B
    EzeeloginSetup your Secure Linux SSH Gateway.
    |Manage & Administer Multiple Linux Servers Quickly & Securely.

  8. #8
    Join Date
    Mar 2009
    Posts
    2,218
    Quote Originally Posted by mikelawss View Post
    I really have no idea how to do that, I dont know much about Mysql, could you break it down a little further for me? I can email you the fil eif that would help. Thanks again

    Here is that block
    $db_dns->query("select id,name,layout from domains_data.domains where main_dom = 1");
    $main_doms = array();
    while($s=$db_dns->fetch_row()) {
    $main_doms[] = $s;

    Mike
    That does not tally with the error message, which is referring to a SELECT statement in file /var/wkscript/db.php on line 75

  9. #9
    Were you able to get the problem resolved?

    If so, how?

  10. #10
    Yes it was fixed, I don't know what he (LP support) did though as I was busy working with him to fix a more severe problem lol. I can ask him this evening and forward to you if your interested

  11. #11
    Yea that would be appreciated - if you want I'll PM you my email.

    I think I have the same problem.

  12. #12
    Sure, Ill get it to you as soon as I here back from him. Will be awhile, Im stuck at work another 5 hours.

Similar Threads

  1. mysql database problem
    By djacks89 in forum Programming Discussion
    Replies: 7
    Last Post: 02-26-2006, 01:21 AM
  2. Mysql Database Problem Help PLs..
    By Eser in forum Hosting Security and Technology
    Replies: 5
    Last Post: 01-05-2006, 04:30 PM
  3. mysql problem - creating database
    By basf in forum Hosting Security and Technology
    Replies: 2
    Last Post: 10-13-2004, 04:07 AM
  4. Problem with mysql win. database server
    By macdonaldp in forum Web Hosting Lounge
    Replies: 0
    Last Post: 04-17-2004, 11:56 PM
  5. $10 help solve mysql database problem?
    By David Tan in forum Employment / Job Offers
    Replies: 13
    Last Post: 04-14-2003, 12:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •