[PHP] myPhpAdmin/mysql/php/ Problem
who's fault is this?: I have a table 'cdrequest' it has columns 'albumfill' and 'releasedatefill' among others when i do the following query with myphpadmin update cdrequest set albumfill = hot shots II, releasedatefill = 20010708 where requstID = 2; i get: You have an error in your SQL syntax near '\hot shots II\, releasedatefill = 20010708 where requstID = 2' at line 1 I can't see any reason for the error. part 2: when I flip to properties for the cdrequest just to make sure i'm spelling the columns corectly and cut and paste the exact same query on that page IT WORKS Why would it work on that page but not the other. both are supposed to be places where you can enter a normal sql query.. It also doesn't work in my PHP script which is where I really want it to work. What am I missing?? thanx Julian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] another REGEX question
I have a string can look like either of the following: psome stuff/p p align = leftsome stuff/p I want to use eregi_replace to take out the first p tag whether it be p or p align.. with a space I assumed that $str = eregi_replace (p.*, ,$str); but it matches the entire string and thus turns the whole string into one space. aparently regex will match the biggest possible match rather than the smallest my question is how do i get it to match the smallest. thanx in advance.. Julian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] another REGEX question
hahah that had two interesting effects the first was that it left the and the second was that it turned off all the highlighting in my editor due to the ? any idea how to include the braces in the match and perhaps not using the ? string for the sake of convenience :) Julian 8/2/01 5:19:03 PM, Jack Dempsey [EMAIL PROTECTED] wrote: Try $str = preg_replace(p.*?, ,$str); jack -Original Message- From: Julian Simpson [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 02, 2001 5:16 PM To: [EMAIL PROTECTED] Subject: [PHP] another REGEX question I have a string can look like either of the following: psome stuff/p p align = leftsome stuff/p I want to use eregi_replace to take out the first p tag whether it be p or p align.. with a space I assumed that $str = eregi_replace (p.*, ,$str); but it matches the entire string and thus turns the whole string into one space. aparently regex will match the biggest possible match rather than the smallest my question is how do i get it to match the smallest. thanx in advance.. Julian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] regex question
I'm trying to parse an existing html file using php. I need to use regex to find the first (and only the first) occurance of i and the last (and only the last) occurance of /i in a string. They will be replaced with ||. example of a string: blah blah isome stuff/i that i ineed to get/i blah blah blah. needs to become: blah blah ||some stuff that i need to get|| blah blah blah. so the following is what i need. //replace outer tags with || $string = ereg_replace (Some regex that only finds the first i,||,$string); $string = ereg_replace (Some regex that only finds the last /i,||,$string); //take out remaining (inner) tags. $string = ereg_replace (i,,$string); $string = ereg_replace (/i,,$string); thanks Julian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]