Dashboard

A place to discuss development of the Xataface core.

Dashboard

Postby siggj » Tue Jul 20, 2010 4:24 am

Hello,

Very nice job for begining !

I have a question with the dashboard you create in the wiki... In the dashboard.php we have this :

<?php
class actions_dashboard {
function handle(&$params){
$bibs = df_get_records_array('bibliographies', array());
df_display(array('bibliographies'=>$bibs), 'dashboard.html');
}
}

With this code, we can say we get all the bibliographies and then we pass the bibliographies to the dashboard.html.

How can I take just the bibliographies which begin with "A" for example ?

Sorry for my english ... :)
siggj
 
Posts: 12
Joined: Tue Jul 20, 2010 4:22 am

Re: Dashboard

Postby shannah » Tue Jul 20, 2010 9:53 am

See http://xataface.com/wiki/URL_Conventions for some details of Xataface queries. In this case we are doing the queries programmatically, but it still works.

In response to your specific question, you could get all bibliographies with a 'citation' field that begins with 'A' using the following:
Code: Select all
$bibs = df_get_records_array('bibliographies', array('citation'=>'~A%'));


or ends in A
Code: Select all
$bibs = df_get_records_array('bibliographies', array('citation'=>'~%A'));


-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Dashboard

Postby siggj » Wed Aug 25, 2010 1:52 am

Thank you very much !

It works good :)
siggj
 
Posts: 12
Joined: Tue Jul 20, 2010 4:22 am


Return to Xataface Developers

Who is online

Users browsing this forum: No registered users and 17 guests

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