How to create and present a new view ?

A place for users and developers of the Xataface to discuss and receive support.

How to create and present a new view ?

Postby goxatago » Fri Jul 09, 2010 2:24 am

Hello,
First of all, thank you very much for a truly great package !. Clearly a lot of smart forward thinking went into it.
I have setup my database, field presentation, validation and table relationships. Everything works great. Thank you again Steve.

However... somehow I am not clear on how to setup a custom view within xataface. I know how to do this in mysql, but I am definitely missing something on including this in xataface.
The views I have in mind are the type you would create with mysql "group by" statements, to calculate fields, get totals, etc. My first though was to create a "view_x" directory inside the tables directory and then create a corresponding "fields.ini" that will include a custom "__sql__" statement. Assuming I get this done, how can I make them show up in the xataface interface ?

I would really appreciate it if someone can point me to the right direction.

Thank you.

S.
goxatago
 
Posts: 14
Joined: Fri Jul 09, 2010 2:08 am

Re: How to create and present a new view ?

Postby shannah » Tue Jul 13, 2010 10:17 am

Just set up the view in mysql, then work with it in Xataface as it it was a table.
All you need to do is tell xataface which columns comprise the primary key of the view in the fields.ini file, using the Key=PRI directive.

e.g.
Code: Select all
[myfield]
    Key=PRI
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 30 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved