[pmwiki-users] Selectquery display results
Guy Moreau
gmyx at gpws.ca
Sun Dec 30 13:09:27 CST 2007
Hello Eric,
Unfortunately, I have come across this one before but can't reproduce
it. I'm wondering if you could provide with some a bit of info such as
PHP, MySql and ADODB Version? I have a feeling I might be using a
function that is not available in a older version of one of the
mentioned items.
Partington, Eric wrote:
> Firstly thanks for an excellent wiki product.
>
> Here is my problem, I think I may be missing something simple to make
> this work but at the moment I am unable to locate that piece. I am
> using selectquery to try to display some records from a local mysql table.
>
> The selectquery.php page is in the cookbook folder.
>
> Here is the config.php:
>
> #adodb db connection
> $Databases['smac'] = array(
> 'driver' => 'mysql',
> 'hostname' => 'localhost',
> 'database' => 'smac',
> 'username' => 'XXXXXXX',
> 'password' => 'XXXXXX');
>
> include "cookbook/dataquery.php";
>
> #selectquery
> $SelectQuerySettings['database']='smac';
> include "cookbook/selectquery.php";
>
> This is the query that i try to run on the page.
> (:selectquery columns="date, coe_release" tables=release_history
> where="coe_release > 0" display=debug:)
>
> In display=debug mode I get the following response at the top:
>
> SelectQuery Version: 2.0 Beta 4
> params key: '#' value: Array
> params key: 'columns' value: date, coe_release
> params key: 'tables' value: release_history
> params key: 'where' value: coe_release > 0
> params key: 'display' value: debug
> params key: 'n' value: Admin.Relhist
> params key: 'author' value: 853232650
> params key: 'PHPSESSID' value: 43efd6ed85c8077ef988764b3adbaf2b
> Processing : date and isliteral:false
> Processing : coe_release and isliteral:false
> query: SELECT date, coe_release FROM release_history WHERE coe_release > 0
> out: 23 rows selected.<br /><br /><table
> class="selectquery"><tr><th>date</th><th>
> coe_release</th></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table>
>
>
> It seems like the tables are created for the 23 items that are selected
> but not diplayed at all. Instead I get this as the output on the page:
>
> 23 rows selected.
>
>
> *date* * coe_release*
>
> The connection is made to the database and the correct results are
> selected (confirmed by the mysql console) but the results are not
> displayed on the page. What am I missing or where did I go wrong?
>
> Thanks,
>
> Eric Partington
>
>
> _______________________________________________________________________
>
> This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations.
> Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized.
> If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.
>
> Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent.
> Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite.
> Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users
mailing list