| 
					
				 | 
			
			
				@@ -356,7 +356,7 @@ function tripal_core_chado_insert($table, $values, $options = array()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $psql = "PREPARE currval_" . $table . "_" . $field . " AS SELECT CURRVAL('" . $table . "_" . $field . "_seq')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         $is_prepared = tripal_core_chado_prepare("currval_$table", $psql, array()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if ($is_prepared) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-           $value = db_fetch_object(chado_query("EXECUTE currval_$table")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           $value = db_result(chado_query("EXECUTE currval_" . $table. "_" . $field)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           $sql = "SELECT CURRVAL('" . $table . "_" . $field . "_seq')"; 
			 |