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