[SOLVED] SQL problem ??? (not sure)

If you've problems with unsupported - non official ;-) - functionalities use this forum please.
Post Reply
liro
Posts: 41
Joined: Thu 16. Jun 2005, 08:29
Location: Netherlands
Contact:

[SOLVED] SQL problem ??? (not sure)

Post by liro »

Hi,
I have tried to implement the RT {art_read} by Jensz but encounter - I think - a problem with a php-file or the sql-database.

Please check my site. On top of it it lists the following code:
:0} function get_article_read_cnt($art_id, $cat_id, $dbcon) { $count = 0; $sql ="SELECT count( article_id ) as art_cnt FROM ".DB_PREPEND."phpwcms_article_read_count WHERE article_id = $art_id AND cat_id = $cat_id "; if($result = mysql_query($sql, $dbcon)) { $row = mysql_fetch_assoc($result); $count = $row["art_cnt"]; mysql_free_result($result); } return $count; } // {ART_READ} if( ! ( strpos($content["all"],'{ART_READ:')===false ) ) { $content["all"] = preg_replace('/\{ART_READ:(\d+):(\d+)\}/e','get_article_read_cnt($1,$2,$db);',$content["all"]); } ?>

Why does it appear there? Any suggestion how to fix this?

Rolph
Last edited by liro on Tue 14. Nov 2006, 14:13, edited 1 time in total.
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

no - this is not a Problem with the Database - this is a 'selfmade' Problem by you ;) seems that you have forgotten or added somewhere somthing by adding the art_read RT - check all Files you have edited again - this is Code from the Script and the Error must be short before this chown Code starts.
This comes from the PHP Interpreter - he stops correct working at this Point.
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
Post Reply