Dashboard
Archived from the Xataface Developers forum.
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 …
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
siggj — Wed Aug 25, 2010 1:52 am
Thank you very much !
It works good