Unable to add new record
20 posts
• Page 2 of 2 • 1, 2
Re: Unable to add new recordPHP4 is what my hosting company loads by default. I've got 3 databases on this web site, all using a Xataface front end and I'm scared of breaking anything!
Re: Unable to add new recordTo be honest, I don't know where that code in the index.php file came from! I thought Xataface put it in there all by itself.
I actually have another problem with this file. The interface was originally only accessing one table in the database, but now I've allowed access to another table. Unfortunately, it looks like Xataface is trying to enforce these sort rules to the other table, which doesn't have the same fields. How do I make this piece of code only apply to the "greyhounds" table? Thanks.
Re: Unable to add new recordAh - I found the answer in another thread. This appears to work:
Re: Unable to add new recordThe best way is actually to put this inside the beforeHandleRequest() method of the application delegate class, and to use the query as returned from Dataface_Application::getQuery() because that way it guarantees that the -table parameter has been set.
e.g.
*This code only works in PHP 5 or higher due to chaining. **It is important to return the query by reference (i.e. =&) so that you can affect the query in place. Steve
Re: Unable to add new recordI've just noticed another issue with this installation. When I first log in to the database, the greyhounds table displays in list mode, but it's not sorted. If I go to another screen and then go back to the list, it's sorted by dog_name like it should be.
Any idea why it isn't sorted the first time in? Thanks,
20 posts
• Page 2 of 2 • 1, 2
Who is onlineUsers browsing this forum: No registered users and 20 guests |