Forum Moderators: coopster

Message Too Old, No Replies

Weird mysql_query and Smarty problem

getting blank pages...

         

canglan

2:36 pm on Nov 15, 2005 (gmt 0)

10+ Year Member



Hi folks,

I am having a critical problem with mysql_query and Smarty template. I've tried to seek for help on the smarty forum but apparently I got virtually no response there.

Okay, here is my problem. My script is written to run on both mysql and mysqli extension. My script uses Smarty as the template engine. The problem is that it runs perfectly on mysqli_query, but on mysql_query it outputs blank pages.

The template simply won't render if I have mysql_query on that page. I've checked my code and can see no errors. The code runs fine on mysqli anyway.

Does anyone have any clue what's going on here? I'm totally lost and don't know where to start solving the problem. FYI, I've checked error logs, turned on E_ALL, nothing is wrong. The sql queries are correct because they work fine on mysqli_query. The templates are correct because they work fine on mysqli_query. The connection/database selection of mysql_* are correct because they work fine without Smarty.

It's just odd. :/

Please someone gimme your hands, I am desperately need help here.

Thank you in advance.

-Canglan

canglan

2:48 am on Nov 16, 2005 (gmt 0)

10+ Year Member



I've finally found what the problem was! I am just so dumb. :(

Okay, I apply filters on sql queries (which includes mysqli_real_escape_string and such), but somehow I messed the custom function. So now I fixed that and boohoo! It worked great! :D

coopster

3:40 am on Nov 16, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Happens to everyone, canglan. Don't be so hard on yourself ;) Glad you got it sorted.