CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 using login parameter in grid

Print topic Send  topic

Author Message
kirchaj
Posted: 08/05/2004, 9:56 AM

I am sure this is a silly question, but I have not been able to find an answer to it. I have a simple app where the user logs in, gets a menu, and when they click on a menu it is supposed to display a grid with info relating to the users login id. I can get the login info by using the following


global $loginid;
$loginid = CCGetUserLogin();
echo ($loginid);


This does show that the correct user is logged in but how do I use this as part of the query. I have tried all of the options I can find and none of them seem to work.

Thanks for the help.

Tony
klw
Posted: 08/05/2004, 10:24 AM

You could use the global $login value to update the SQL
used to retrieve the records for the grid within the
' Before Execute Select Event'

i.e.
global $PeopleGrid;
global $loginid;

$PeopleGrid->ds->Where = "uid = " . $loginid;
DonB
Posted: 08/05/2004, 11:29 AM

Set the Data Source of your grid properties to add a parameter that is
"CCGetUserLogin()". You can choose from URL, Form, Expression, etc. for the
parameter type (the dropdown list). Just set that to "Expression" and type
the function into the textbox.

--
DonB

logging at http://www.gotodon.com/ccbth, and blogging at
http://ccbth.gotodon.net


"kirchaj" <kirchaj@forum.codecharge> wrote in message
news:5411266b8a0990@news.codecharge.com...
> I am sure this is a silly question, but I have not been able to find an
answer
> to it. I have a simple app where the user logs in, gets a menu, and when
they
> click on a menu it is supposed to display a grid with info relating to the
> users login id. I can get the login info by using the following
>
>
> global $loginid;
> $loginid = CCGetUserLogin();
> echo ($loginid);
>
>
> This does show that the correct user is logged in but how do I use this as
part
> of the query. I have tried all of the options I can find and none of them
seem
> to work.
>
> Thanks for the help.
>
> Tony
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

kirchaj
Posted: 08/06/2004, 6:04 AM

:( Ok guys, I have tried both suggestions and still don't get the results I want. I either get all records regarless of the id, or I get no records. I am sure it is just something I don't understand or haven't done.

Any ideas?

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.