Relationships and sql query

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

Relationships and sql query

Postby grageot » Tue Jul 13, 2010 9:03 am

Hello
Thanks for this application more simple than others tested.
I have a problem with an SQL query in relationships.ini : one to many relations between a table source "donateurs" (id is the primary key) and "tra nsac10" the destination table
1st problem
first I tried :
Code: Select all
[Dons en 2010]
__sql__ = "SELECT * FROM `transac10` WHERE id = '$id'"

It works well : all the fields of "transac10" appears in the tab

When I use :
Code: Select all
[Dons en 2010]
__sql__ = "SELECT `MontantDon10` , `DateDon10` , `InfoDon10` FROM `transac10` WHERE id = '$id'"

I want only the 3 fields of the table "transac10" BUT all the fields appear in the tab like in the former query

2nd Problem
When i used the "add a new record in transac10" the edit tab is opened but the result is never saved in the base (controlled with PhpMyAdmin)
Where is the misfit ?
Ragards
Guy
grageot
 
Posts: 7
Joined: Sun Jul 11, 2010 12:06 am

Re: Relationships and sql query

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

Names for relationships cannot contain spaces. If you want you can customize the label of the relationship to have spaces.
See http://xataface.com/wiki/relationships.ini_file for relationships.ini file directives.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Relationships and sql query (solved)

Postby grageot » Tue Jul 13, 2010 12:04 pm

Thank you for this quick and efficient answer : relationships works correctly
grageot
 
Posts: 7
Joined: Sun Jul 11, 2010 12:06 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 43 guests

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