bad function
Bug #194378 reported by
Luca
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Sylar PHP Web-Framework |
Fix Released
|
Low
|
Gianluca Giusti [brdp] |
Bug Description
if the function resultRows() in the Database.php class
has called before that the connection is opened, the function crash
Sorry for my english...
Changed in sylar: | |
importance: | Undecided → Low |
status: | New → In Progress |
assignee: | nobody → brdp |
To post a comment you must log in.
It' not a bug because once you run the query you can close the connection and after read the data in the result. For example:
db->connect();
$sql = "select * from SYLAR_event_log";
$db->execSmartQ uery($sql) ;
$db->disconnect();
if($db- >resultRows( ) > 0){ $row=$db- >fetchArray( ) ) {
while(
echo "\n";
print_r( $row );
}
}else{
echo "No rows found.";
}