• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Could not delete a single image from a model!![SOLVED]

[eluser]Mizanur Islam Laskar[/eluser]
Well, I didn't quite get your point. But I removed '@' before unlink, but didn't get any good. Neighter get any error message.

$picture = $row->picture;
Try using those 2 lines in place of the current 2 lines.

[eluser]Référencement Google[/eluser]
I am not sure mysql_affected_rows() return something while using a DELETE query.
Also on this point, you should use CI's active record to make your test.

Secondly, it will we good for us to help you that you send the print_r($picture) result.
Also, in your code, there is an extra "." that should not be there: $picture .= $row->picture;

Ok, I just took a good look at your code and its inherently flawed.
You are trying to read what you just deleted? Try this instead:
function delete_data($record_id)
    $query =  $this->db->get_where('projukti_committee',array('record_id' => $record_id));
    if( $query->num_rows() > 0 )
        $row = $query->row();
        $picture = $row->picture;
        $this->db->delete('projukti_committee', array('record_id' => $record_id));
        return true;
    return false;  

[eluser]Mizanur Islam Laskar[/eluser]
Thank you very much Mr. XtraFile!!! It worked....wowwwwwww

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.