Re: [PHP-DB] PDO Exception Handling Question

2006-05-03 Thread Cyril PIERRE de GEYER
But if there is an error in the SELECT query (either syntax error, or reference to missing table), then no exception is raised, and control just continues in the try block with a null result from the query. Is this the intended behaviour? Hey, it's really fun I was looking here and on

Re: [PHP-DB] PDO Exception Handling Question

2006-05-03 Thread Cyril PIERRE de GEYER
And also my question is : Why did the PDO creators (Wez the King?) decide to choose the silent mode for being the default one ? Why not defining the ERRMODE_WARNING by default ? Or perhaps I misunderstand something, and I would be very happy to learn a bit :) Thx Cyril -- PHP Database

Re: [PHP-DB] PDO Exception Handling Question

2006-05-03 Thread Cyril PIERRE de GEYER
Read on otn : PDO_ERRMODE_SILENT This is the default mode; it will simply set the error code for you to inspect using the errorCode() and errorInfo() methods of both the statement and database handle objects. if (!$dbh-exec($sql)) { echo $dbh-errorCode() . br; $info =

[PHP-DB] preg_replace help!

2006-05-03 Thread Nathan Heaps
Hey, I need some help. I am trying to parse a forum post using php, but it parses it everytime it sees the letter, not the thing in quotes. Any help? function bbcodereplace($subject){ // $document should contain an HTML document. // This will remove HTML tags, javascript sections // and white

Re: [PHP-DB] preg_replace help!

2006-05-03 Thread John Hicks
Nathan Heaps wrote: I am trying to parse a forum post using php, but it parses it everytime it sees the letter, not the thing in quotes. What letter? What thing in quotes? -J -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] preg_replace help!

2006-05-03 Thread Nathan Heaps
Wait, its a different thing now. You see, I am trying to replace phpbb's bbcode with working html code, but what makes it hard is that phpbb inserts a number after SOME of the bbcode tags. Here is what I have so far: function bbcodereplace($subject){ $search = array

[PHP-DB] MySQL + MySQLi with PHP 5.1.3 ./configure errors

2006-05-03 Thread NickPoole
Hi, I've been searching all day through all the reasources i can find for a pointer in the right direction. I've just started a clean install of my LAMP system, and got to PHP. On ./configure it goes through all the normal processes untill it reaches the -lmysqladmin line, where it kicks out

RE: [PHP-DB] preg_replace help!

2006-05-03 Thread Liber
// /\[i(.*?)\](.*?)\[\/i(.*?)\]/, // Italics /\[u(.*?)\](.*?)\[\/u(.*?)\]/, // Underline /\[img(.*?)\](.*?)\[\/img(.*?)\]/, // Image /\[b(.*?)\](.*?)\[\/b(.*?)\]/); // Bold Change to /\[i:(.*?)\](.*?)\[\/i:(.*?)\]/, // Italics

Re: [PHP-DB] preg_replace help!

2006-05-03 Thread Nathan Heaps
nevermind, I got it fixed. Just had to rearrange it. it was sensing the i in img as italic so if you put it first it would work. - Original Message - From: Liber [EMAIL PROTECTED] To: 'Nathan Heaps' [EMAIL PROTECTED]; 'John Hicks' [EMAIL PROTECTED] Cc: php-db@lists.php.net Sent:

Re: [PHP-DB] preg_replace help!

2006-05-03 Thread Nathan Heaps
Ok, scratch that, new problem. what can I replace (.*?) with in order for php to recognise a multi-line quote/bold/italic/code/whatever? - Original Message - From: Liber [EMAIL PROTECTED] To: 'Nathan Heaps' [EMAIL PROTECTED]; 'John Hicks' [EMAIL PROTECTED] Cc: php-db@lists.php.net