Page 1 of 1

Dashboard

PostPosted: Tue Jul 20, 2010 4:24 am
by siggj
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 ... :)

Re: Dashboard

PostPosted: Tue Jul 20, 2010 9:53 am
by shannah
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

Re: Dashboard

PostPosted: Wed Aug 25, 2010 1:52 am
by siggj
Thank you very much !

It works good :)