http://nullnyan.i2p/b/44227
function getReplies ( $postId , $threadId ) { $db = connectDB (); $stmt = $db -> prepare ( "SELECT * FROM posts WHERE parent = :threadId AND (status = 0 OR status = 3) AND (message LIKE '%<post-link>>>' || :postId || '</post-link>%') ORDER BY id ASC" ); ... } function generatePostLinks ( $message ) { return preg_replace_callback ( '/<post-link>>>(\d+)<\/post-link>/' , function ( $matches ) { $postId = $matches [ 1 ]; $db =...