Page 1 of 1

MYSQL Revigniter QUERIES datagrid features questions

Posted: Fri Feb 28, 2014 11:21 am
by istech
HI Livecoders,

I have been playing with MYSQL and Revigniter over the last couple days and want to find out a little more information about generating custom table results.

For example if I wanted to add check boxes to my table of results and link them to URLs or other records how could I do this in Revigniter and MYSQL?

I have been looking through the guide and a lot makes sense. I suppose the main question here is does Revigniter support datagrid features? If so does

anyone have some more examples to share? I suppose this feature can be done using JSON but is there a option internally in Revigniter? I have been reading

about the QUERY2JSON plugin maybe that is the way to go or use php which I am trying to avoid if I can. I am interested to hear your thoughts thanks

Re: MYSQL Revigniter QUERIES datagrid features questions

Posted: Fri Feb 28, 2014 2:23 pm
by Klaus
As far as I know, RevIgniter is a WEB framework, so it will only serve/return HTML, NOT stacks!
Means: no datagrid features of any kind.

Re: MYSQL Revigniter QUERIES datagrid features questions

Posted: Fri Feb 28, 2014 2:41 pm
by istech
Thanks for the reply Klaus,

Probably did not make myself clear. Yes Revigniter is a Web framework based on the codeigniter framework and I want to be able to do data grids with it

and I want to know if any one has done it and can show some examples.

Something like this Codeigniter version http://code.tutsplus.com/tutorials/buil ... -net-22004

but for Revigniter. Maybe this feature is built in or someone has done it before. Thanks

Re: MYSQL Revigniter QUERIES datagrid features questions

Posted: Fri Feb 28, 2014 2:54 pm
by Klaus
Hi istech,

just to make it clear, in the link you posted, a "datagrid" is NOT the Livecode object,
but "just" an elaborated HTML Table with buttons and all kind of stuff, created using
HTML, JavaScript and CSS!

But probably you already know this :D


Best

Klaus

Re: MYSQL Revigniter QUERIES datagrid features questions

Posted: Fri Feb 28, 2014 3:06 pm
by istech
:D Yes I know this......Just to be clear 8)

I was just using the Livecode version to reference. I wish there was something like the Livecode version for Revigniter. (Some day? New Revlet? on route?)

Maybe someone has done something like this which could be helpful that has more experience with Revigniter than me that has some pointers as I do not

want to use php if I can help it. (The html tables etc is not the problem the php stuff is as Revigniter uses LC and not php)

Re: MYSQL Revigniter QUERIES datagrid features questions

Posted: Fri Feb 28, 2014 3:13 pm
by dave.kilroy
This is an extract from the 'Form Helper' entry in revIgniter's user guide:
rigSetCheckbox()

Permits you to display a checkbox in the state it was submitted. The first parameter must contain the name of the checkbox, the second parameter must contain its value, and the third (optional) parameter lets you set an item as the default (use boolean TRUE/FALSE). Example:

Code: Select all

put rigSetCheckbox("myCheck[]", "A") into gData["myCheckA"]
put rigSetCheckbox("myCheck[]", "B") into gData["myCheckB"]
put rigSetCheckbox("myCheck[]", "C") into gData["myCheckC"]

Code: Select all

<input type="checkbox" name="myCheck[]" value="A" [[gData["myCheckA"] ]] />
<input type="checkbox" name="myCheck[]" value="B" [[gData["myCheckB"] ]] />
<input type="checkbox" name="myCheck[]" value="C" [[gData["myCheckC"] ]] />
Then it's a matter of populating 'gData["myCheckA"]', 'gData["myCheckB"]' and 'gData["myCheckC"]' with data from a MySQL query - and sticking the whole think in a html table (sorry revIgniter is "na pop na style, a strictly roots" and you need html/css to add style...)

Re: MYSQL Revigniter QUERIES datagrid features questions

Posted: Fri Feb 28, 2014 3:21 pm
by Klaus
istech wrote::D Yes I know this......Just to be clear 8)
Okie Dokie, glad we've talked about this :D
istech wrote:(Some day? New Revlet? on route?)
No, NEVER! Revlets are dead and will surely not be revived anymore.

Re: MYSQL Revigniter QUERIES datagrid features questions

Posted: Fri Feb 28, 2014 3:31 pm
by istech
Many thanks Dave,

I will give it go (with a view and controller) and report back. I expect to run into a few road blocks but that is the fun of coding again thanks for the guidance. What are your thoughts on revigniter on a whole. Any tips to add would be helpful.

Re: MYSQL Revigniter QUERIES datagrid features questions

Posted: Fri Feb 28, 2014 4:45 pm
by dave.kilroy
Hi istech (apologies to all for an out-of-synch posting earlier on)

Regarding revIgniter - I think it's great, I just wish I had more time to play around with it so I could get it to do more - but the work that Ralf has put in means his framework saves me bucket-loads of time.

Just so you know, there is a mailing list just for revIgniter (it's not very busy but when I need specialised help it's great to have) http://lists.livecodejournal.com/listin ... ournal.com

Dave
PS: I'm with Klaus - drive a wooden stake through the heart of any zombie revlets you find

Re: MYSQL Revigniter QUERIES datagrid features questions

Posted: Fri Feb 28, 2014 4:48 pm
by Klaus
dave.kilroy wrote:PS: I'm with Klaus - drive a wooden stake through the heart of any zombie revlets you find
:D :D :D