Home » HTML » HTML_QuickForm » Bug #5705
using loadDBResult with DB_FETCHMODE_OBJECT
Details
| Submitted | 2005-10-17 12:37 UTC |
|---|---|
| From | m dot lindeman at pictura-dp dot nl |
| Assigned | avb |
| Status | Closed |
| Package | HTML_QuickForm |
| PHP Version | Irrelevant |
| OS | Kubuntu linux |
| Roadmaps | (Not assigned) |
Comments
[2005-10-17 12:37 UTC] m dot lindeman at pictura-dp dot nl
Description:
------------
in method loadDBResult of class HTML_QuickForm_select there is no support for fetchmode DB_FETCHMODE_OBJECT when $textCol=null and $valueCol=null.
Test script:
---------------
<?php
$db = DB::Connect('mysql://user:passwd@host/dbname');
$db->setFetchMode(DB_FETCHMODE_OBJECT);
$rs = &$db->Query('SELECT COL1, COL2 FROM table');
$form = new HTML_QuickForm();
$select = &$form->createElement('select');
$select->loadDbResult($rs);
$form->display();
?>
Expected result:
----------------
<form ....>
<select>
<option value="row1__value">row1_text</option>
...
</select>
</form>
Actual result:
--------------
<form ....>
<select></select>
</form>