Ask a Question related to Coldfusion Database Access, Design and Development.
-
gcmenotti #1
Query dosen't work
hi friends i have a question
i make this on application.cfm
<cfapplication sessionmanagement="yes"
name="UniqueName"
ClientManagement="No"
SessionTimeout="#CreateTimeSpan(0,0,30,0)#"
SetClientCookies="Yes">
<cflogin>
<cfif IsDefined('FORM.submit')>
<CFQUERY NAME="qLogin" DATASOURCE="myaccount">
<!--- Select NombreUsuario, Clave, IdUsuario
FROM dbo.ClientesMyAccount, dbo.Usuarios
WHERE dbo.ClientesMyAccount.Id_Cliente = dbo.Usuarios.IdUsuario
AND dbo.Usuarios.NombreUsuario = '#FORM.username#'
AND dbo.Usuarios.Clave = '#FORM.password#' --->
SELECT NombreUsuario, Clave, IdUsuario, Fkcliente
FROM dbo.ClientesMyAccount INNER JOIN dbo.Usuarios ON
(dbo.ClientesMyAccount.Id_Cliente = dbo.Usuarios.FkCliente)
WHERE dbo.Usuarios.IdUsuario = dbo.Usuarios.IdUsuario
AND dbo.Usuarios.NombreUsuario = '#FORM.username#'
AND dbo.Usuarios.Clave = '#FORM.password#'
</cfquery>
<CFQUERY NAME="clientes" DATASOURCE="myaccount">
Select *
from dbo.ClientesMyAccount, dbo.Usuarios
where dbo.Usuarios.FkCliente = dbo.ClientesMyAccount.Id_Cliente
</CFQUERY>
<cfif qLogin.RecordCount GT 0>
<cfloginuser name="#qLogin.idusuario#" password="#FORM.password#"
roles="#qLogin.fkcliente#" />
<cfelse>
<cfset sHeaderMessage = "The email and password combination you tried is
incorrect."/>
<cfinclude template="login.cfm" />
<cfabort />
</cfif>
<cfelse>
<cfinclude template="login.cfm" />
<cfabort />
</cfif>
</cflogin>
then on the index.cfm
i make this query
<cfif isDefined("qLogin.idusuario")>
<CFQUERY NAME="cuenta" DATASOURCE="myaccount">
SELECT TOP 100 Llamadas.NumeroOrigen, Llamadas.NumeroDestino,
Llamadas.Starttime, Llamadas.Fecha, Llamadas.CostoLlamada, Llamadas.Codigo,
Llamadas.Destino, Llamadas.Tarifa, Llamadas.FkCliente, Usuarios.FkCliente AS
Expr1
FROM Llamadas INNER JOIN
Usuarios ON Llamadas.FkCliente = Usuarios.FkCliente AND Llamadas.FkCliente =
Usuarios.FkCliente
AND Llamadas.FkCLiente = '#qLogin.idusuario#'
ORDER BY Llamadas.Fecha DESC
</cfquery>
</cfif>
but it retunrs in blank space
i make a login site but when the persone validate it
the query dont returns the data to the rich form can somebody helpme please
i have a specic id for the table so in any case 1 person can only se an
specific information
i use FKCliente for the type of member, here is the rows view
[url]http://img229.imageshack.us/img229/3900/row6rf.jpg[/url]
gcmenotti Guest
-
DreamWeaver behavior dosen't work for flash player 8
Hi, I'd use to control my .swfs with the dreamweaver behavior (control shockwave or flash), but since i did download the flashplayer8 the .swf do... -
Query use to work on CF 4.5
I'm getting the following error "No value given for one or more required parameters." However this worked on CF 4.5 but not on CF 6.1. Any ideas? ... -
getopt from iiug ftp site dosen't work
Hi! I'm running: $ c4gl -V INFORMIX-4GL Version 7.30.UC5 Software Serial Number XXX#XXXXXX on HPUX 10.20. I downloaded... -
Flash movie dosen't preview in browser?
I have a small flash movie that dosen't preview in either of the browers I use. If I click on the "play" button it plays just fine. What is not... -
XP Pro Dosen't remember passwords
Scotty; Try this: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B264672 -- Jupiter Jones An easier way to read newsgroup... -
Dan Bracuk #2
Re: Query doesn't work
You don't have a where clause
change this
FROM Llamadas INNER JOIN
Usuarios ON Llamadas.FkCliente = Usuarios.FkCliente AND Llamadas.FkCliente =
Usuarios.FkCliente
AND Llamadas.FkCLiente = '#qLogin.idusuario#'
to
FROM Llamadas INNER JOIN
Usuarios ON Llamadas.FkCliente = Usuarios.FkCliente
/*
this part is redundant, get rid of it
AND Llamadas.FkCliente = Usuarios.FkCliente
/*
-- change and to where
where Llamadas.FkCLiente = '#qLogin.idusuario#'
Dan Bracuk Guest



Reply With Quote

