View Single Post
Old 02-12-2009, 05:05 PM   #4 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

The error is very clear, an Exception has been thrown but you have nothing in place to catch it. Wrap your code (not the class) in a try/catch block and see which exception is being thrown:
PHP Code:
try
{
    
$connection = new mysql('localhost''root''''cms');
    
$query "SELECT ID, Username, Password, Email FROM admins";
    
$connection->query($query);  
}
catch(
Exception $e)
{
   echo 
$e->getMessage();

Since you were throwing exceptions, I figured you already knew how to catch them.
Salathe is offline  
Reply With Quote