I try to count and PHP pukes
Posted 18 June 2006 - 02:34 AM
$sql = sprintf("SELECT COUNT(*) AS test FROM %s WHERE login = '%s' AND cc = '%s' AND schoolid= '%s'", 'classnotes', 'teacher', '0155', '0631');
$result = mysql_query($sql) or die(mysql_error());
but this is thowing an error "No Database Selected"
The same SQL statement works fine in PHPmyAdmin.
What don't I see?
Thanks in advance.
Posted 18 June 2006 - 02:52 AM
[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=95432\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=95432[/a]
Posted 18 June 2006 - 02:59 AM
Don't worry, the printer fairies will sort it out.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users