+ Post New Thread
Results 1 to 2 of 2
Web Development Thread, MySQL syntax error in Coding and Web Development; I'm trying to make the display of computers not being used as mentioned in another thread. I am using Webmans ...
  1. #1

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,821
    Thank Post
    272
    Thanked 1,140 Times in 1,036 Posts
    Rep Power
    351

    MySQL syntax error

    I'm trying to make the display of computers not being used as mentioned in another thread.

    I am using Webmans Login tracker for the script and database but I've got an error in the Mysql syntax which i can't seem to work out.

    Code:
    $computer = mysql_query("SELECT hostname_id FROM logins WHERE active = 1");
    $computer_f = mysql_fetch_array($computer);
    $computer_f_id = $computer_f['hostname_id'];
    $lib = mysql_num_rows(mysql_query("SELECT hostname FROM hostnames WHERE hostname LIKE 'lib-%' AND hostname_id = $computer_f_id")or die(mysql_error()));

  2. #2

    Join Date
    Jan 2007
    Location
    Lowestoft, Suffolk
    Posts
    84
    Thank Post
    6
    Thanked 4 Times in 4 Posts
    Rep Power
    16
    Can you show the actual error you're receiving? Syntax errors, usually give a good clue as to where the problem is.



SHARE:
+ Post New Thread

Similar Threads

  1. SYntax error
    By Lipjam in forum Scripts
    Replies: 3
    Last Post: 15th September 2010, 12:15 PM
  2. xcopy syntax
    By leco in forum How do you do....it?
    Replies: 2
    Last Post: 28th August 2010, 11:37 AM
  3. Replies: 9
    Last Post: 1st April 2010, 04:15 PM
  4. [Fog] Syntax for specifying OU in AD
    By birchanger in forum O/S Deployment
    Replies: 3
    Last Post: 24th July 2009, 05:02 PM
  5. SQL Syntax?
    By ScottStevinson in forum How do you do....it?
    Replies: 2
    Last Post: 8th September 2008, 02:01 PM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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