[Phpmyadmin-devel] [GSoC2012] Refactoring: Table search, Db search, Multi-table query

Marc Delisle marc at infomarc.info
Wed Apr 4 18:27:52 CEST 2012


Le 2012-04-03 16:28, Ammar Yasir a écrit :
> On Tue, Apr 3, 2012 at 4:03 AM, Ammar Yasir <ayax88 at gmail.com> wrote:
> 
>> Hi,
>>
>> The noticed that the table search scripts(tbl_select.php,
>> tbl_zoom_select.php) and multi-table query(db_qbe.php) basically display a
>> 'Query-by-Example' form. I think we can design a qbeForm class through
>> which we can customize a QBE form for each of the three scripts.
>>
>> The basic elements of a QBE form are columns and details about each
>> column. Considering column as an entity, we can assign HTML content of each
>> column element like datatype, collation, operator, sort, criteria as the
>> attributes of 'column' entity. To be more specific,
>> a 'column'  entity would contain,
>> S.No. | Attribute        |   HTML               |  Script
>>  1      |  Data-type      |  text                   | tbl_select.php,
>> tbl_zoom_select.php
>>  2      |  Collation       |  text                   | tbl_select.php,
>> tbl_zoom_select.php
>>  3      |  Sort             |  HTML Select      | db_qbe.php
>>  4      |  Ins/Del         | HTML input         | db_qbe.php
>>  5      |  Modify         |  output of S.No 4 | db_qbe.php
>>  6      |  Show           | HTML checkbox  | db_qbe.php
>>  7      | Criteria          |  (a) HTML input   | db_qbe.php
>>                                | (b) HTML Select | tbl_select.php,
>> tbl_zoom_select.php
>>  8      |  Value           | (a) HTML input    | tbl_select.php,
>> tbl_zoom_select.php
>>                               |  (b) multiselect    | tbl_select.php,
>> tbl_zoom_select.php
>>                               | Foreign Values    | tbl_select.php,
>> tbl_zoom_select.php, browse_foreigners.php
>>
>> We can decide on what HTML we want to display for each 'column'
>> entity(depending on the script in consideration) and customize our QBE form.
>> One thing to note is that, from 'column' entity we will generate an empty
>> HTML skeleton (say column block). The values of HTML select and others(for
>> example operators) will be updated using AJAX calls. I guess that could
>> also be included as a procedure in the QBE class (or column class).
>> A QBE form can consist of various column blocks ( tbl_zoom_select.php has
>> 2, db_qbe.php initially has 3 and tbl_select.php has count($fields) ).
>> For, db_qbe.php 'column' blocks can be added dynamically just by creating
>> an instance of 'column' entity.
>> One issue could be that in tbl_zoom_select.php and db_qbe.php we need to
>> select columns, i.e, columns are displayed in a select box, while in
>> tbl_select.php all the columns are listed. But I guess, it can be worked
>> out in time.
>>
>> Regards,
>> Ammar Yasir
>>
>> Would such OOP be feasible?

Ammar,
maybe but db_qbe.php has a look very different from tbl_select.php.

-- 
Marc Delisle
http://infomarc.info

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: OpenPGP digital signature
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120404/d607b61b/attachment.sig>


More information about the Developers mailing list