View Full Version : sql - delete not work
I try delete line in mysql database and it dont work.Here is a code:
$sql = "DELETE FROM sentences_servers WHERE sentences_servers.id = '". $_GET['id']. "'";
$result = mysql_query($sql);
I dont see any mistake.:confused:
07-20-2011, 06:18 PM
Your account doesn't have permission to create or delete databases outside of cpanel. This is because they automatically prepend your account name to the database and it's on a shared server so they don't want you being able to delete other people's databases.
If you want to be able to do this programmatically, you're going to have to write a script that logs into cpanel and does it from there.
I have all permissions. (I only test it on localhost)
07-21-2011, 12:33 PM
Okay, well rather than outputting a string saying there was an error, you should be using mysql_error() (http://php.net/mysql_error) so you can see the actual error it's encountering.
mysql_error : No database selected
I dont include conect.php
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.