delete blog

Codes here !

Moderators: egami, macek, gesf

Post Reply
johnj
php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Tue Aug 14, 2012 6:37 am

...delete * from blogtable where blogid=$id
are you sure that this sql is correct?

User avatar
freshnet
php-forum Active User
php-forum Active User
Posts: 359
Joined: Tue Feb 22, 2011 8:19 am
Location: Canada

Tue Aug 14, 2012 9:01 am

You're also missing the ; from the end of that line, so I'd expect you to get an error somewhere.

User avatar
freshnet
php-forum Active User
php-forum Active User
Posts: 359
Joined: Tue Feb 22, 2011 8:19 am
Location: Canada

Thu Aug 16, 2012 7:10 am

ok for a delete if you want the number of rows you will need to use $n=mysql_affected_rows($result); . For the query itself, try capturing the error (you can just echo mysql_error()). You also should be using mysqli/PDO instead of mysql. See http://php.net/manual/en/function.mysql ... d-rows.php For more information.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests