Re: query.recordcount woes...

2000-04-05 Thread David Shadovitz

Justin and Holger nailed it.  I just want to add that your query is
problematic.  Your where clause should always contain both a username and
password.  Don't forget that passwords are not unique.  Also, your code
could produce the nonsensical "where and password = ...".  I'd use
JavaScript on the first form to ensure that a non-blank username and
password have been supplied.
-David

On Wed, 5 Apr 2000 15:36:27 +0200 "Holger Lockertsen"
<[EMAIL PROTECTED]> writes:
> If the recordcount of the query is 0, I don't think the code between 
> the
> -tags is processed. A better way to do it is:
> 
> TheQuery
> 
> 
>   
> 
>   
> 
> 
> rgds
> 
> 
> * Holger Lockertsen, Solutions Developer, Horisont Information 
> Systems AS
> * Nedre Slottsgate 5, N-0157 OSLO, Noreg/Norway
> * 23 31 03 04 / 91 83 20 51
> * [EMAIL PROTECTED]   http://www.horisont.no/
> 
> NB! Horisont har fått nye nummer, og mitt INTERNNUMMER er: 23 31 03 
> 04
> 
> 
> -Original Message-
> From: McDonald, David [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 05, 2000 3:15 PM
> To: '[EMAIL PROTECTED]'
> Subject: query.recordcount woes...
> 
> 
> I have been trying to set up a username and password login, which is
> working okay, except for the "failed login" scenario.  The  
> tag does
> not
> execute the  tag for a failed login (ie. 
> query.recordcount is
> 0).  I'm lost as to why.  Here's my code (called from a previous 
> template
> form supplying the username and password variables):
> 
> 
> SELECT UserID, Username, Password, FirstName, LastName
> FROM User
> WHERE
> 
> Username='#Username#' AND
> Password='#Password#')
> 
> 
> 
> 
> 
>   
> 
>   
> 
> 
> 
> If the recordcount is not equal to 0 (successful login), it works
> beautifully, but if the recordcount is 0 (failed login), the
>  code does not 
> execute, it
> simply returns a blank page (with the cf server info displayed).
> 
> Anyone help me with this?  It seems very straightforward but has me 
> stumped.


YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: query.recordcount woes...

2000-04-05 Thread Won Lee



If they leave it blank the query will return all rows (actually 1 since you
have a maxrows =1)
place your 

  

or someting like that...you should be able to figure it out now

-Original Message-
From: McDonald, David [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 05, 2000 9:15 AM
To: '[EMAIL PROTECTED]'
Subject: query.recordcount woes...


I have been trying to set up a username and password login, which is 
working okay, except for the "failed login" scenario.  The  tag does
not 
execute the  tag for a failed login (ie. query.recordcount is
0).  I'm lost as to why.  Here's my code (called from a previous template
form supplying the username and password variables): 

 
SELECT UserID, Username, Password, FirstName, LastName 
FROM User 
WHERE ( 
Username='#Username#' AND 
Password='#Password#') 
 
 
 
 
 
 
 
 

If the recordcount is not equal to 0 (successful login), it works 
beautifully, but if the recordcount is 0 (failed login), the 
 code does not execute, it
simply returns a blank page (with the cf server info displayed). 

Anyone help me with this?  It seems very straightforward but has me stumped.


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: query.recordcount woes...

2000-04-05 Thread Holger Lockertsen

If the recordcount of the query is 0, I don't think the code between the
-tags is processed. A better way to do it is:

TheQuery







rgds


* Holger Lockertsen, Solutions Developer, Horisont Information Systems AS
* Nedre Slottsgate 5, N-0157 OSLO, Noreg/Norway
* 23 31 03 04 / 91 83 20 51
* [EMAIL PROTECTED]   http://www.horisont.no/

NB! Horisont har fått nye nummer, og mitt INTERNNUMMER er: 23 31 03 04


-Original Message-
From: McDonald, David [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 05, 2000 3:15 PM
To: '[EMAIL PROTECTED]'
Subject: query.recordcount woes...


I have been trying to set up a username and password login, which is
working okay, except for the "failed login" scenario.  The  tag does
not
execute the  tag for a failed login (ie. query.recordcount is
0).  I'm lost as to why.  Here's my code (called from a previous template
form supplying the username and password variables):


SELECT UserID, Username, Password, FirstName, LastName
FROM User
WHERE

Username='#Username#' AND
Password='#Password#')











If the recordcount is not equal to 0 (successful login), it works
beautifully, but if the recordcount is 0 (failed login), the
 code does not execute, it
simply returns a blank page (with the cf server info displayed).

Anyone help me with this?  It seems very straightforward but has me stumped.


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: query.recordcount woes...

2000-04-05 Thread Justin MacCarthy

It's because you have the CheckLogin.recordcount  within the 
tags, therefore if there are no row returned nothing with the cfoutput's
will run

~ Justin
Irish CF Head

- Original Message -
From: McDonald, David <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 05, 2000 2:14 PM
Subject: query.recordcount woes...


> I have been trying to set up a username and password login, which is
> working okay, except for the "failed login" scenario.  The  tag does
> not
> execute the  tag for a failed login (ie. query.recordcount is
> 0).  I'm lost as to why.  Here's my code (called from a previous template
> form supplying the username and password variables):
>
> 
> SELECT UserID, Username, Password, FirstName, LastName
> FROM User
> WHERE

> Username='#Username#' AND
> Password='#Password#')
> 
> 
> 
> 
> 
> 
> 
> 
>
> If the recordcount is not equal to 0 (successful login), it works
> beautifully, but if the recordcount is 0 (failed login), the
>  code does not execute, it
> simply returns a blank page (with the cf server info displayed).
>
> Anyone help me with this?  It seems very straightforward but has me
stumped.
>
> --

> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
>

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.