Forums

WhereSql Tutorial Help

zoomlanski 05 Dec, 2008
I ordered a book on SQL to learn some of the coding. I'm having trouble knowing what put in the WhereSQL box to call up the database jos_choronoforms_hazardous_addresses?

http://www.local277.com/index.php?option=com_chronoconnectivity&connectionname=hazardousaddresses

My body table headings will be: cf_id,uid,recordtime,ipaddress,cf_user_id,date_27,text_12,text_15,text_9,text_20,text_18,select_21,text_22

I'm happy to do some reading on SQL if someone can point me to a ref.

Cheers,
Tim
GreyHead 05 Dec, 2008
Hi zoomlanski,

You choose the database table with the dropdown in ChronoConnectivity's General Tab labelled 'tablename(s)'

The WHERE clause selects which records you want to select from the table for example WHERE id='99' or WHERE id >= '5' AND id < '100'

Bob
zoomlanski 06 Dec, 2008
I need alot of spoon feeding here. I adjusted the code with the Where call on the SQL and I get a Unknown column 'id' in 'where clause' SQL=SELECT count(*) FROM jos_chronoforms_hazardous_addresses WHERE cf_id >= '1' AND id < '100'

So back to square one. I have selected the database and there are two records in there presently with practice data, so I two out of three lined up.

So the question is how does one publish the data in the table? The tutorial didn't help me. Is there an advanced tutorial for rookies like myself?

Tim "The Rookie"
GreyHead 06 Dec, 2008
Hi zoomlanski.

The WHERE clause needs to relate to the column/field names and values in your table.If you don't have an 'id' column then it will show an error.

If you just want to show all the records in your table then leave the entry blank.

There is a short tutorial on the WHERE clause here at W3C schools.

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