PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old May 10th, 2007, 02:00 PM
fefurst fefurst is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 4 fefurst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 32 m 55 sec
Reputation Power: 0
Exclamation PHP5 + HTML_Template_IT + MDB2(MySQL) Broken template problem

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.

Reply With Quote
  #2  
Old May 10th, 2007, 03:43 PM
wiesemann wiesemann is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 152 wiesemann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 h 26 m 25 sec
Reputation Power: 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.

Reply With Quote
  #3  
Old May 11th, 2007, 07:57 AM
fefurst fefurst is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 4 fefurst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 32 m 55 sec
Reputation Power: 0
Thanks for the fast answer ...

Quote:
Originally Posted by wiesemann
It's likely that you're doing something wrong then. Have you tried to use prepare() etc. outside the framework?


Yes, and the problem persists ...

Quote:
Originally Posted by wiesemann
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.


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 ...

Reply With Quote
  #4  
Old May 14th, 2007, 01:32 PM
fefurst fefurst is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 4 fefurst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 32 m 55 sec
Reputation Power: 0
More tests ...
when I call setTemplate() after prepare()
the error ocurrs ...

Reply With Quote
  #5  
Old May 17th, 2007, 06:18 AM
fefurst fefurst is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 4 fefurst User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 32 m 55 sec
Reputation Power: 0
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).

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > PHP5 + HTML_Template_IT + MDB2(MySQL) Broken template problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway