[Phpmyadmin-devel] Fetch the primary key field value for each data row
Marc Delisle
marc at infomarc.info
Sat Mar 24 16:17:07 CET 2012
Le 2012-03-23 16:54, Chanaka Dharmarathna a écrit :
> Hi,
>
> I am trying to do some improvements on feature request [1]. A field (let's
> call it as 'picture') with mime type "mime/jpeg" is not showing th image,
> if the query (execute in query window) retrieve the 'picture' field from
> the table (SELECT `picture` FROM `table_name` WHERE 1) as mentioned in [1].
>
> To display data, $where_clause is generated by the function
> PMA_getUniqueCondition (in root/libraries/common.lib.php) row wisely. For a
> long data like blob type, it returns $where_clause as empty string ("").
> (There is conditions to check the length of the data in that function)
>
> What I'm trying to do is, for that kind of scenarios, make the
> $where_clause as "`table`.`primary_key_feild_name` =
> 'primary_key_value_for_corresponding_row'" (tried with hard coding & works
> for me). To do this I'm going to add a new argument to
> PMA_getUniqueCondition function with those two parameters (primary field
> name & relevant value). And call this inside PMA_displayTableBody function
> (in display_tbl.lib.php) with those values.
>
> If the way I'm going is correct,
> Is there any way to fetching out primary key field value of each row while
> inside the PMA_displayTableBody function ?
> Or is there global parameter which holds table meta data ?
Look at $fields_meta which is available in this function.
--
Marc Delisle
http://infomarc.info
More information about the Developers
mailing list