en
From: RaJeSh VeNkAtA <[EMAIL PROTECTED]>
To: Bastien Koert <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], php-db@lists.php.net
Subject: RE: [PHP-DB] If syntax
Date: Sun, 2 Oct 2005 22:25:16 +0530 (IST)
think this is wrong ... as it gives unique alias even if the query is not
execu
d
Sent: Sun 10/2/2005 11:11 AM
To: php-db@lists.php.net
Cc:
Subject: RE: [PHP-DB] If syntax
Please PMJI, but I'm new to PHP but have a little experience with
databases, and I have a question:
Is there a particular reason that LIK
#x27;$alias%' LIMIT 1";
becomes:
"SELECT alias FROM tablename WHERE alias LIKE '%' LIMIT 1";
at execution-time.
Regards,
Dave
-Original Message-
From: Jeffrey [mailto:[EMAIL PROTECTED]
Sent: Sun 10/2/2005 3:32 AM
T
num_rows($result)==1))
{
echo "Alias already in use";
} else {
echo "Unique alias";
mysql_close();
}
Bastien
From: "Ron Piggott" <[EMAIL PROTECTED]>
Reply-To: "Ron Piggott" <[EMAIL PROTECTED]>
To: "PHP DB"
Subject: [PHP-DB
From: "Ron Piggott" <[EMAIL PROTECTED]>
Reply-To: "Ron Piggott" <[EMAIL PROTECTED]>
To: "PHP DB"
Subject: [PHP-DB] If syntax
Date: Sat, 1 Oct 2005 22:28:46 -0500
Take a look at my if ( ) syntax line below. I am wondering if I have it
wrong in same way.
See below...
Ron Piggott wrote:
Take a look at my if ( ) syntax line below. I am wondering if I have it
wrong in same way. What I am trying to achieve is if the alias the user
enters is already found in the database I want the words "Alias already in
use" to be shown on the screen; otherwise
i think for unique alias u have keep
alias='$alias' ??
and also "if" statement will always be true as the mysql statement is
always correct and will be executed .
U have to check the result of query for whether there
r ne aliases or not ...
On Sat, 1 Oct 2005, Ron Piggott wrote:
Take a l
Take a look at my if ( ) syntax line below. I am wondering if I have it
wrong in same way. What I am trying to achieve is if the alias the user
enters is already found in the database I want the words "Alias already in
use" to be shown on the screen; otherwise "Unique alias" to be shown on the
sc