RE: [PHP-DB] If syntax

2005-10-02 Thread Bastien Koert
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

RE: [PHP-DB] If syntax

2005-10-02 Thread Mitchell, David
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

RE: [PHP-DB] If syntax

2005-10-02 Thread Mitchell, David
#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

RE: [PHP-DB] If syntax

2005-10-02 Thread RaJeSh VeNkAtA
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

RE: [PHP-DB] If syntax

2005-10-02 Thread Bastien Koert
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.

Re: [PHP-DB] If syntax

2005-10-02 Thread Jeffrey
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

Re: [PHP-DB] If syntax

2005-10-01 Thread RaJeSh VeNkAtA
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

[PHP-DB] If syntax

2005-10-01 Thread Ron Piggott
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