<div>Hi,</div><div><br></div><div><span class="Apple-style-span" style="border-collapse: collapse; ">>permUsrPref.table should not be hardcoded, but configurable</span><br><br></div><div>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".</div>
<div><br></div><div><span class="Apple-style-span" style="border-collapse: collapse; ">>permUsrPref class should be named PMA_PermUsrPref and it should be<br>>defined in libraries/PermUsrPref.class.php</span></div><div>
<br></div><div>done</div><div><br></div><div><span class="Apple-style-span" style="border-collapse: collapse; ">>You should really use PMA_query_as_controluser</span></div><div><br></div><div>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 <span class="Apple-style-span" style="border-collapse: collapse; ">PMA_query_as_controluser<span class="Apple-style-span" style="border-collapse: separate; ">: </span></span></div>
<div><br></div><div>return PMA_DBI_fetch_result(PMA_query_as_controluser($sql));</div><div><br></div><div>I have also commented out implementation of <span class="Apple-style-span" style="border-collapse: collapse; ">PMA_query_as_controluser in ./libraries/PermUsrPreg.class.php just in case if you were interested in seeing.</span></div>
<div><br></div><div><br></div><div><span class="Apple-style-span" style="border-collapse: collapse; ">>You copy the same code to several places, it should be rather single<br>>include which would provide all what is needed to access preferences.</span></div>
<div><br></div><div>I created a function in ./libraries/common.lib.php to include common files. Please let me know if there are further improvements you can suggest on this issue.</div><div><br></div><div>I also tried to include:</div>
<div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre"> </span>/*</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>* Creates a $pma_usr_prefs pointer</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>*/</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>$pma_usr_prefs = new PMA_PermUsrPref();</div><div><br></div><div>but it seems it is not being recognized as an object because of being remotely included in a standalone function:</div>
<div><span class="Apple-style-span" style="font-family: 'times new roman'; font-size: 16px; "><b>Fatal error</b>: Call to a member function fetchSettingValue() on a non-object</span></div></div><div><br></div><div>
>All I can say is that is really not<br>>something what looks like finished and cleaned up work. And it is<br>>definitely not ready for inclusion.<br><br>Well, that is why I need feedback from phpMyAdmin gurus (like you) so I can fix such problems (sometimes lame) before the code is committed. :-)</div>
<div><br></div><div>You can <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=2825187&group_id=23067&atid=377410#">download the revision</a> through tracker.</div><div><br></div><div><br></div>
<div>Thanks so much for you help! I highly appreciate your time and dedication. :-)</div><div><br></div><div>[0] <a href="http://www.nabble.com/about-choosing-table-layout-for-pmadb-td23879613.html#a23879613">http://www.nabble.com/about-choosing-table-layout-for-pmadb-td23879613.html</a></div>
<div>[1] <a href="http://zixan.info/pma/pma_error.html.0-dev">http://zixan.info/pma/pma_error.html.0-dev</a></div><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 Tue, Aug 11, 2009 at 5:07 PM, Michal Čihař <<a href="mailto:michal@cihar.com">michal@cihar.com</a>> wrote:<br>><br>> Dne Tue, 11 Aug 2009 12:57:40 -0400<br>
> "Zeeshan M." <<a href="http://zeeshan.jp">zeeshan.jp</a>@<a href="http://gmail.com">gmail.com</a>> napsal(a):<br>><br>> > > * @TODO Figure out why SQL queries do not give proper results<br>
> > >- this means that your code does not work?<br>> ><br>> > This is actually very old. So, please ignore it.<br>><br>> Well I don't care whether it is old or not. It is in thing which you<br>
> have called "final revision". All I can say is that is really not<br>> something what looks like finished and cleaned up work. And it is<br>> definitely not ready for inclusion.<br>><br>> --<br>
> Michal Čihař | <a href="http://cihar.com">http://cihar.com</a> | <a href="http://phpmyadmin.cz">http://phpmyadmin.cz</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>