[EMAIL PROTECTED] wrote:
?!?!?!?!?!?!
I hope youi used str_repeat() to generate that.
seriously though, have you tried it?
that said your [probably] better off just doing 1 query:
UPDATE members SET member_name = 'N/A' WHERE member_name = '';
that said your [probably] better off
I wonder why this sarcasm? Why so rude?
-afan
[EMAIL PROTECTED] wrote:
?!?!?!?!?!?!
I hope youi used str_repeat() to generate that.
seriously though, have you tried it?
that said your [probably] better off just doing 1 query:
UPDATE members SET member_name = 'N/A' WHERE
Jochem,
You are wrong. I tried and it worked. But, when I asked can I, I meant
Am I allowed to do that. The same as many security or other kind
questions where answer is: Yes, it works - but it's NOT correct.
Yes, I did search php.net but didn't find answer.
Yes, I did search mysql.com but didn't
[EMAIL PROTECTED] wrote:
You are wrong.
there's a first for everything, heh.
I tried and it worked. But, when I asked can I, I meant
Am I allowed to do that. The same as many security or other kind
then say what you mean in future. you already knew that you *can* do it,
you should have
[EMAIL PROTECTED] wrote:
I wonder why this sarcasm? Why so rude?
your original question could have been answered by:
a, trying to run the code provided (thats called testing btw)
b, reading php.net
c, reading mysql.com/docs (or where ever they have the docs this week)
my reply not only
At 4:11 PM +0200 6/15/06, [EMAIL PROTECTED] wrote:
Jochem,
You are wrong. I tried and it worked. But, when I asked can I, I meant
Am I allowed to do that. The same as many security or other kind
questions where answer is: Yes, it works - but it's NOT correct.
Yes, I did search php.net but didn't
Yes, you are right, I had to be more carefull about how to write my post.
Thanks.
for bruising your ego? or for originally giving 2 suggestions as to better
strategies for doing what you *seemed* to be wanting to achieve - 2
suggestions
which you blatantly seemed to ignore in favor of
Am I allowde to do this:
$query = mysql_query(SELECT member_id, member_name FROM members);
while($result = mysql_fetch_array($query))
{
if(empty($result['member_name']))
{
mysql_query(UPDATE members SET member_name = 'N/A' WHERE member_id =
.$result['member_id'].);
}
}
As far as I
[EMAIL PROTECTED] wrote:
Am I allowde to do this:
$query = mysql_query(SELECT member_id, member_name FROM members);
while($result = mysql_fetch_array($query))
{
if(empty($result['member_name']))
{
mysql_query(UPDATE members SET member_name = 'N/A' WHERE member_id =
member_id, ifnull(member_name,'N/A') FROM members
Satyam
- Original Message -
From: [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Wednesday, June 14, 2006 11:37 PM
Subject: [PHP] can I do this: update table while selecting data from table?
Am I allowde to do this:
$query
?!?!?!?!?!?!
[EMAIL PROTECTED] wrote:
Am I allowde to do this:
$query = mysql_query(SELECT member_id, member_name FROM members);
while($result = mysql_fetch_array($query))
{
if(empty($result['member_name']))
{
mysql_query(UPDATE members SET member_name = 'N/A' WHERE member_id
@lists.php.net
Sent: Wednesday, June 14, 2006 11:37 PM
Subject: [PHP] can I do this: update table while selecting data from
table?
Am I allowde to do this:
$query = mysql_query(SELECT member_id, member_name FROM members);
while($result = mysql_fetch_array($query))
{
if(empty($result['member_name
12 matches
Mail list logo