Forums

"little" help needed - showing data from tables

AZADISTAN 14 Oct, 2009
hi, i'm looking to solve my problems for one week - after googleling for ph,javascript and especially ChronoConnectivity Help i finally decided to ask for help here...

My biggest problem is that i wanted to show data from two ChronoForms formulars.

But after searching and reding the tutorial i still dont know WHERE to put some code to try little things...

For example i have to forms that work in Chronoforms.. thes have records and save data..

now i want that users cann look for exaple tablename {test1},{test2} the tables in my form {test3} the users shouldn't see.. An he should edit only {test2} (if value bigger than another tables value it should send an email...

when i try to write some code in php for showing data oder javascript to do some cpumutation in the forms... ic dont know where to put it.. so i dont know if its right and so on...

I'm also from germany so its little bit hard to understand 100% what is the difference
of putting code in "Query Related Settings" - or "Connection View Settings".....😶
GreyHead 14 Oct, 2009
Hi Azadistan,

In its current release ChronoConnectivity can only display data from one table at a time*.

Neither does ChronoConnectivity send emails.

You can probably do what you want in ChronoForms - that will support emails, javascript and has the ability to query more than one database table if you write the MySQL to do the query.

Bob

*It is possible to hack it to accept more complex queries but it's not simple.
AZADISTAN 15 Oct, 2009
ok i mixed it up a little..

in chronoconnecticvity i just want to show one form..

perhaps a contact form.. {name},{telefonnumber},{street}.. and i just wanted to show the data from naem and street.... i think this is possible
but i dont know how to make this
GreyHead 15 Oct, 2009
Hi AZADISTAN,

There's a long thread here that starts out with a post by BenBlee showing how to set up ChronoConnectivity. Search Ben's posts and you should easily find it.

Bob
gemlog 13 Dec, 2009

Hi Azadistan,

In its current release ChronoConnectivity can only display data from one table at a time*.

Neither does ChronoConnectivity send emails.

You can probably do what you want in ChronoForms - that will support emails, javascript and has the ability to query more than one database table if you write the MySQL to do the query.

Bob

*It is possible to hack it to accept more complex queries but it's not simple.



I was going to be flip and comment that it is too bad mysql doesn't support views, but it appears that it does now:
http://dev.mysql.com/doc/refman/5.0/en/create-view.html

I've just been using pgsql for so many years and ignoring mysql that I didn't know that until tonight, so there's another way to do it without hacking anything. To be fair, mysql really was lacking back in the day. Looks like they have been working hard to close the gap in recent years.

I didn't read that whole page, but I'm assuming that they'd implement the same way as postgres, oracle, firebird etc., e.g. you write whatever kind of SELECT you want and create a VIEW and then pretend it's a real table for all intents and purposes.

Views are very powerful and let you simplify a lot of things for forms and reports. Also, you can make some insanely complicated joins using joined views which themselves contain joins :-)
GreyHead 13 Dec, 2009
HI gemlog,

Neat, I was vaguely aware that existed but, like compound queries, I've never used it. Could be useful for a current project.

Bob
gemlog 13 Dec, 2009
Oh, good then, glad I got that across ok.

I pretty much make a view whenever I have to write a new report. That way I can just do a select all later. My thinking is that the best place to store a complicated query is in the db as a view and then it's always backed up and available (assuming you backup your db hourly/daily/realtime(drbd)).

This makes mysql vastly more useful. I'm going to go look and see if they do stored procedures these days too. My bad. I just wrote it off as something only useful as a webtoy and never looked again until now. Mysql has really come a long way in functionality and I feel a bit silly not keeping up on it.

p.s they do stored procedures now too, don't know how many langs they support. Transactions too. Well, well. When I first looked at mysql it had none of those and did row locking to boot. pg has other handy things like geo, but maybe mysql is covering that too? -- I'm just giving up investigating for tonight. Spooks me that Oracle bought it tho.
This topic is locked and no more replies can be posted.