Maybe you have to use wildcards like:
mysql_query(delete from members where company like '%$delete%');??
Daniel E Massón.
Ingeniero de desarrollo
[EMAIL PROTECTED]
Imagine S.A.
Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57
You have a syntax error. Look at your quotes.
-Kevin
- Original Message -
From: Sunfire [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 3:05 PM
Subject: [PHP] delete query doesnt work
i have a delete query:
mysql_query(delete from members where
First two things I'd check:
(1) Make sure the user you're connecting as has permission to delete
rows, and
(2) Make sure that your $delete variable has the value you were
expecting.
---
Mark Roedel | Blessed is he who has learned to laugh
Systems Programmer| at himself, for he
What is the error message you get if you put this in
if(!mysql_query(delete from members where company='$delete')) die (mysql_error());
This would be the first step.
Robbert van Andel
-Original Message-
From: Sunfire [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 07, 2003 2:06 PM
that submitting a
variable from 1 form to another that some wont get carried over?
- Original Message -
From: Van Andel, Robbert [EMAIL PROTECTED]
To: Sunfire [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 5:05 PM
Subject: RE: [PHP] delete query doesnt work
What is the error
PROTECTED]
Subject: Re: [PHP] delete query doesnt work
it doesnt say anything query returns 1 and there are 0 errors and 0 warnings
but when i echo the query string:
echo delete from members where company= '$delete';
it will show on the web page:
delete from members where company =
so the $delete
--- Sunfire [EMAIL PROTECTED] wrote:
so the $delete is blank for some reason... is it
possible that submitting a variable from 1 form
to another that some wont get carried over?
No. It might help to read this:
http://www.php.net/manual/en/security.registerglobals.php
Chris
--
PHP General
Then you just answered your own question.
-Kevin
- Original Message -
From: Sunfire [EMAIL PROTECTED]
To: Kevin Stone [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 3:37 PM
Subject: Re: [PHP] delete query doesnt work
ok so i mistyped it the real one is
mysql_query(delete from
checked;
}
?
dont know why it doesnt work...any ideas?
- Original Message -
From: Van Andel, Robbert [EMAIL PROTECTED]
To: Sunfire [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 5:30 PM
Subject: RE: [PHP] delete query doesnt work
I've never heard of a variable
-Original Message-
From: Sunfire [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 07, 2003 2:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] delete query doesnt work
here is the forms that delete uses:
//the first one is the combo box to select a member to
//delete
form action=delete.php
: RE: [PHP] delete query doesnt work
You're form code is incorrect.
option value=select a member to deletebr
should read
option value=select a member to delete/option
The line: value=\$DeleteMember[Company]\\$DeleteMember[Company]\br;
should read
value=\$DeleteMember[Company]\\$DeleteMember
, February 07, 2003 5:51 PM
Subject: RE: [PHP] delete query doesnt work
You're form code is incorrect.
option value=select a member to deletebr
should read
option value=select a member to delete/option
The line:
value=\$DeleteMember[Company]\\$DeleteMember[Company]\br;
should read
value
PROTECTED]]
Sent: Friday, February 07, 2003 6:16 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] delete query doesnt work
ok i changed the endings to those to /option but still keep getting
blank
variable in the end for $delete in the delete query
- Original Message -
From: Van Andel
: Friday, February 07, 2003 3:16 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] delete query doesnt work
ok i changed the endings to those to /option but still keep getting blank
variable in the end for $delete in the delete query
- Original Message -
From: Van Andel, Robbert [EMAIL PROTECTED
string it gets lost...
- Original Message -
From: Van Andel, Robbert [EMAIL PROTECTED]
To: Sunfire [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, February 07, 2003 6:14 PM
Subject: RE: [PHP] delete query doesnt work
Okay. Next step would be to check the select option values
Hi,
I think you are facing problem with variable delete.
Make sure your Php.ini settings for global off. Check
value of variable is coming on the form or not.
In case of your update, i think you forget to put
where part. For example:
mysql_query(update table_name set
--- Sunfire [EMAIL PROTECTED] wrote:
in the form that submits the $delete var add this:
input type=hidden name=flag_delete value=$delete
now in query change $delete to $flag_delete... and poof
it magically works
It's not magic, and John Holmes already explained it to
you.
If you do not pass
17 matches
Mail list logo