Forums

Selectstatement in ChronoConnectivity

tgl 16 Mar, 2009
I have just completed an example posted in this forum - great work and thumbs up.

You can see the example here : http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=5&t=12324

But now I want to select and show some specific posts, say Firstname = "John "and Lastname = "Doe" from a table named jos_chronoforms_src.

So my questions is :

1) Where should I put the select statement?
- In the "WHERE SQL"?
- in the "header"?
- in the "body"?
- or in the "footer"?

2) How should the select statement be written? (just a simple example is ok)

I refer to Connections management and the tab named General.
I use Joomla 1.5.9
GreyHead 20 Mar, 2009
Hi tgl,

In general the WHERE sql box is the place to use - but just for the WHERE part of the SELECT statement.

Bob
peverheart 26 Mar, 2009
Greyhead,
2) How should the select statement be written? (just a simple example is ok)

I have the similiar question. I want the SQL lookup to use the currently logged in userId , Here is the php i have in the where box:
<?php
$user = JFactory::getUser();
$Id = $user->id;

?>
where cf_user_id = <?php echo $Id ?>

This gives me what I need, but is this how it was intended to be used?
GreyHead 26 Mar, 2009
Hi peverheart,

It will be something like:

echo "WHERE `Firstname` = 'John' AND `Lastname` = 'Doe' ";


Bob
This topic is locked and no more replies can be posted.