lowercase match for pgsql
This commit is contained in:
		
							parent
							
								
									f7f3057278
								
							
						
					
					
						commit
						155f3cf9e8
					
				| @ -394,9 +394,13 @@ class Image { | |||||||
| 
 | 
 | ||||||
| 		// insert each new tags
 | 		// insert each new tags
 | ||||||
| 		foreach($tags as $tag) { | 		foreach($tags as $tag) { | ||||||
| 			$id = $database->db->GetOne( | 			if($database->engine->name == "pgsql") { | ||||||
| 					"SELECT id FROM tags WHERE lower(tag) = lower(?)", | 				$query = "SELECT id FROM tags WHERE lower(tag) = lower(?)"; | ||||||
| 					array($tag)); | 			} | ||||||
|  | 			else { | ||||||
|  | 				$query = "SELECT id FROM tags WHERE tag = ?"; | ||||||
|  | 			} | ||||||
|  | 			$id = $database->db->GetOne($query, args($tag)); | ||||||
| 			if(empty($id)) { | 			if(empty($id)) { | ||||||
| 				// a new tag
 | 				// a new tag
 | ||||||
| 				$database->execute( | 				$database->execute( | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user