Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
Diod
Forum Commoner
Posts: 52 Joined: Tue Oct 19, 2004 9:07 am
Post
by Diod » Fri Oct 29, 2004 11:44 am
yep, i am the root user.. as i run the db on my own comp
andre_c
Forum Contributor
Posts: 412 Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah
Post
by andre_c » Fri Oct 29, 2004 11:45 am
can you post the whole block of code in which you have your delete statement? Right now you delete statement seems correct.
Diod
Forum Commoner
Posts: 52 Joined: Tue Oct 19, 2004 9:07 am
Post
by Diod » Fri Oct 29, 2004 11:46 am
andre_c
Forum Contributor
Posts: 412 Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah
Post
by andre_c » Fri Oct 29, 2004 11:49 am
can you echo $_GET['id'] right before you use it in your delete query and see if it matches the row you're trying to delete?
( and you really should use mysql_escape_string( $_GET['id'] ) )
Diod
Forum Commoner
Posts: 52 Joined: Tue Oct 19, 2004 9:07 am
Post
by Diod » Fri Oct 29, 2004 11:53 am
yep, it echos it(oh and the query does work in phpmyadmin if you are gonna ask that)
Diod
Forum Commoner
Posts: 52 Joined: Tue Oct 19, 2004 9:07 am
Post
by Diod » Fri Oct 29, 2004 12:18 pm
hmm
but when i do
Code: Select all
$query = "DELET.E FROM news WHERE id='".$news_id."'";
echo $query;
it doesnt echo
Diod
Forum Commoner
Posts: 52 Joined: Tue Oct 19, 2004 9:07 am
Post
by Diod » Fri Oct 29, 2004 1:11 pm
Please, can anyone help me with this... im trying to figure it out for a week now...
andre_c
Forum Contributor
Posts: 412 Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah
Post
by andre_c » Fri Oct 29, 2004 1:20 pm
Diod wrote: hmm
but when i do
Code: Select all
$query = "DELET.E FROM news WHERE id='".$news_id."'";
echo $query;
it doesnt echo
then something is seriously wrong.
do you have error_reporting turned on?
Diod
Forum Commoner
Posts: 52 Joined: Tue Oct 19, 2004 9:07 am
Post
by Diod » Fri Oct 29, 2004 2:06 pm
yep i tryed it with error_reporting('E_ALL') and it doesnt report a thing
Diod
Forum Commoner
Posts: 52 Joined: Tue Oct 19, 2004 9:07 am
Post
by Diod » Fri Oct 29, 2004 3:33 pm
nm someone helped me out