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.
$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()));
Can you show the actual error you're receiving? Syntax errors, usually give a good clue as to where the problem is.