>you should try to replace this .... with a single function call, e. g.: $GLOBALS['cfg']['PropertiesNumColumns'] = PMA_permUsrPrefGet('PropertiesNumColumns');

This would help put the code in one central location.  This is probably better than having the code scattered all over.  But I don't think it would help reduce the amount of code being written, if it were one of the goals.  Some of the settings are not directly applied to global config vars so they have to go through conditional statements. 

> I mean table name, like Sebastian already has explained.

Sure.  Thanks Sebastian!

> You need to add flags PMA_DBI_QUERY_STORE to query if you want to fetch
> whole result at once.

I am SELECTing in the following format, and I still get the same error.  Does it require modifications?

return PMA_DBI_fetch_result(PMA_query_as_controluser($sql),PMA_DBI_QUERY_STORE)

> I think you could use similar way like we use for relation stuff.

Sweet.  Convention used to name functions in relation.lib.php probably makes more sense.


--------------------------------------------------
Best regards,
Zeeshan Mughal
Email: zeeshanmughal@ieee.org
Web: http://www.zixan.info


On Wed, Aug 12, 2009 at 4:08 AM, Michal Čihař <michal@cihar.com> wrote:
>
> Hi
>
> Dne Wed, 12 Aug 2009 02:12:43 -0400
> "Zeeshan M." <zeeshan.jp@gmail.com> napsal(a):
>
> > >permUsrPref.table should not be hardcoded, but configurable
> >
> > I think we discussed this a long time back. [0] I suppose EAV model had
> > "design flaws" as suggested by Marc Delisle, and other developers. Please
> > correct me if I am wrong, or you are referring to something else by
> > "configurable".
>
> I mean table name, like Sebastian already has explained.
>
> > >You should really use PMA_query_as_controluser
> >
> > I can use PMA_query_as_controluser for UPDATE query. But when I use it for
> > SELECT I get errors. [1] Following line of code demonstrates how I am
> > implementing PMA_query_as_controluser:
> >
> > return PMA_DBI_fetch_result(PMA_query_as_controluser($sql));
>
> You need to add flags PMA_DBI_QUERY_STORE to query if you want to fetch
> whole result at once.
>
> > I also tried to include:
> >
> > /*
> > * Creates a $pma_usr_prefs pointer
> > */
> > $pma_usr_prefs = new PMA_PermUsrPref();
> >
> > but it seems it is not being recognized as an object because of being
> > remotely included in a standalone function:
> > *Fatal error*: Call to a member function fetchSettingValue() on a non-object
>
> And what's reason for creating class and function of same name?
>
> I think you could use similar way like we use for relation stuff.
>
>
> --
> Michal Čihař | http://cihar.com | http://blog.cihar.com
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>