Results 1 to 7 of 7
Hybrid View
-
21st Apr 2012, 11:37 PM #1OPBannedWebsite's:
WarezRelease.org ThatHosting.coPreg and Sql
Hi,
here's my code:
PHP Code:$naD = '@^(?:http:\/\/)?([^/]+)\.(mysiteproject\.com|qualtrics\.com|doattend\.com|ning\.com|eventzilla\.net|page\.tl|weebly\.com|espacioblog\.com|pbworks\.com|mysoulspot\.com|fora\.se|healthkicker\.com|posterous\.com|springnote\.com|renspace\.com|beep\.com|blog4ever\.com|insanejournal\.com|webs\.com|zoomshare\.com|webblogg\.se|tl|se|de|edu)@i';
if(preg_match($naD, $surl)) {
mysql_query("DELETE FROM wcddl_sites WHERE url='". $naD ."'");
// header("Location: http://www.google.com");
}
mysql_query("DELETE FROM wcddl_sites WHERE url REGEXP '". $naD ."'");
Can ay1 tell me this ok and if this ok: mysql_query("DELETE FROM wcddl_sites WHERE url REGEXP '". $naD ."'");
?Chris2k Reviewed by Chris2k on . Preg and Sql Hi, here's my code: $naD = '@^(?:http:\/\/)?(+)\.(mysiteproject\.com|qualtrics\.com|doattend\.com|ning\.com|eventzilla\.net|page\.tl|weebly\.com|espacioblog\.com|pbworks\.com|mysoulspot\.com|fora\.se|healthkicker\.com|posterous\.com|springnote\.com|renspace\.com|beep\.com|blog4ever\.com|insanejournal\.com|webs\.com|zoomshare\.com|webblogg\.se|tl|se|de|edu)@i'; if(preg_match($naD, $surl)) { mysql_query("DELETE FROM wcddl_sites WHERE url='". $naD ."'"); // header("Location: Rating: 5
-
22nd Apr 2012, 05:02 AM #2Respected MemberWebsite's:
DL4Everything.com Soft2050.inError is on the sql query:
PHP Code:mysql_query("DELETE FROM wcddl_sites WHERE url='". $naD ."'");
PHP Code:mysql_query("DELETE FROM wcddl_sites WHERE url='". $surl ."'");
-
22nd Apr 2012, 08:27 PM #3OPBannedWebsite's:
WarezRelease.org ThatHosting.co
-
23rd Apr 2012, 02:03 PM #4Respected MemberWebsite's:
DL4Everything.com Soft2050.inThen there must be something wrong with the regex then, your syntax is correct for other query
Paste a test url that you are trying to match and delete from table ($surl) here
As from checking your regex a little, it matches the urls that has free domain: http://asd.mysiteproject.com -- matches
-
27th Apr 2012, 03:15 PM #5OPBannedWebsite's:
WarezRelease.org ThatHosting.coit's working but its missing some, i duno why? Hmmmm is it possible to do the preg to the mysql_query instead of $surl?
-
27th Apr 2012, 04:43 PM #6Respected DeveloperCode:
*snip*|zoomshare\.com|webblogg\.se|tl|se|de|edu)@i
Code:*snip*|zoomshare\.com|(webblogg\.se|tl|se|de|edu))@i
-
28th Apr 2012, 02:19 PM #7OPBannedWebsite's:
WarezRelease.org ThatHosting.cowhat u mean?
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Preg Replace question
By Porsche_maniak in forum Web Development AreaReplies: 7Last Post: 7th Nov 2010, 08:58 AM -
Preg replace help
By SJshah in forum Web Development AreaReplies: 17Last Post: 8th Aug 2010, 10:47 PM
themaPoster - post to forums and...
Version 5.22 released. Open older version (or...