View Single Post
  #5  
Old 03-07-2016, 11:52 PM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 64,506
tahbikat is on a distinguished road
Default

Yea, I made sure everything looked right after adding it. Gives me this error on the myadopts.php page:
Code:
Database error 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' AND owner =''' at line 1
This is how I have it written:
PHP Code:
public function releasepet(){
    
$mysidia Registry::get("mysidia");        
    if(
$mysidia->input->post("submit")){           
       
$mysidia->db->delete("owned_adoptables""aid='{$this->aid} AND owner ='{$this->owner}'");   
    }
    
$this->setField("adopt"$this->adopt);        
    
$this->setField("image"$this->image);            

Edit: when I put a quote after {$this->aid}' it gives me success but i still have the pet.
Reply With Quote