error-handling execute function
git-svn-id: file:///home/shish/svn/shimmie2/trunk@107 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
		
							parent
							
								
									70cab73782
								
							
						
					
					
						commit
						8aa30d3ed2
					
				| @ -55,6 +55,16 @@ class Database { | |||||||
| 			return ceil($result->RecordCount() / $images_per_page); | 			return ceil($result->RecordCount() / $images_per_page); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
|  | 	public function execute($query, $args) { | ||||||
|  | 		$result = $this->db->Execute($query, $args); | ||||||
|  | 		if($result === False) { | ||||||
|  | 			print "SQL Error: " . $this->db->ErrorMsg() . "<br>"; | ||||||
|  | 			print "Query: $query"; | ||||||
|  | 			exit; | ||||||
|  | 		} | ||||||
|  | 		return $result; | ||||||
|  | 	} | ||||||
| // }}}
 | // }}}
 | ||||||
| // extensions {{{
 | // extensions {{{
 | ||||||
| 	public function set_extension_version($name, $version) { | 	public function set_extension_version($name, $version) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user