|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi !
I'm havin' problems using these two classes(Template_IT and MDB2) in the framework that I work. I created a class that stores in db the accesses at the applications, like a log to set up some statistics, this class is instantiated in the constructor of the framework and there are selects and updates made in the db. Problem: When I use these functions, prepare() and execute(), the template shows problems like broken layout and incorrect setting of blocks, and when I use query() function the template shows correctly. Anyone had a problem like this ? May I search for bugs in MDB2 or in HTML_Template_IT ? waitin' Olá ! Estou com problemas ao utilizar estas 2 classes(Template_IT e MDB2) no framework em que trabalho. Criei uma classe que armazena em banco os acessos às aplicações, como um log para fins estatísticos, esta classe é instanciada no construtor do framework e nela são feitas consultas e alterações no banco de dados. Problema: Quando eu utilizo as funções prepare() e execute() dá problema com o template, ele não mostra corretamente, quebra o layout, não seta os blocos corretamente, e quando eu uso a função query() o template é retornado corretamente. Alguém já enfrentou este tipo de problema ? Devo procurar solução na MDB2 ou na HTML_Template_IT ? no aguardo. |
|
#2
|
|||
|
|||
|
It's likely that you're doing something wrong then. Have you tried to use prepare() etc. outside the framework?
If have you verified that you follow the instructions for prepare(), execute() etc. from the PEAR manual, you should try to shorten your code until either the error does not occur anymore or until the code is short enough to show it or its important parts here. |
|
#3
|
||||
|
||||
|
Thanks for the fast answer ...
Quote:
Yes, and the problem persists ... Quote:
I've maked some tests, and, using placeholders shows broken layout, using fixed params. works correctly. WITH prepare() and execute() functions. Ex.: /* DON'T WORK!!! */ $sql = "UPDATE statsacesso SET datahora = ADDTIME(now(), '00:05:00'), tempo = :in_tempo WHERE codsessao = :in_codsessao AND script LIKE '%logout.php%'"; /* WORK!!! */ $sql = "UPDATE statsacesso SET datahora = ADDTIME(now(), '00:05:00'), tempo = $paramInTempo WHERE codsessao = $paramInCodSessao AND script LIKE '%logout.php%'"; I'm shortening the code, if I find the error, good, if I don't, I'll post the code ... |
|
#4
|
|||
|
|||
|
More tests ...
when I call setTemplate() after prepare() the error ocurrs ... |
|
#5
|
|||
|
|||
|
Found it ... fread() function has a bug in PHP version (5.1.2)
Corrected in version 5.1.3 . I must patch my PHP (dapper version). |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PEAR Packages > PHP5 + HTML_Template_IT + MDB2(MySQL) Broken template problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|