Re: [PHP] Replacing with f*ck and f*cking

2008-10-25 Thread Andrew Barnett
Maybe you should look at the source code of an open source project that can already do this such as phpBB. I'm not exactly sure where to find it in the phpBB code though. Andrew 2008/10/26 Ryan S <[EMAIL PROTECTED]> > Hey! > I'm just trying to replace some of the more bad words with their slig

[PHP] Replacing with f*ck and f*cking

2008-10-25 Thread Ryan S
Hey! I'm just trying to replace some of the more bad words with their slightly censored counterparts like so $bad_words = array(/*Well you know the words so am not going to write them here*/); $bad_words_replacements = array("f*ck", "f*cking"); $comment = str_replace("$bad_words",$bad_words_repl

Re: [PHP] clear a mysql table

2008-10-25 Thread Micah Gersten
Ronald Wiplinger (Lists) wrote: > I need to clear a table (cache) from a database based on the database size. > > Our web site uses cached pages. Our webhost only allow us 100 MB > storage. Usually the database is just 10 MB, but when a search engine > crawls our calendar, then the storage is qui

Re: [PHP] what's the difference in the following code?

2008-10-25 Thread Chris Shiflett
On Oct 23, 2008, at 2:10 PM, Jochem Maas wrote: The order is reversed, so if $host has a non-zero length, it is not escaped. first thing that I noticed, second wondering why no charset was specified, thirdly was wondering why it's not plain: $host = htmlentities($host); but nonetheless yo

Re: [PHP] clear a mysql table

2008-10-25 Thread Yeti
I used to have a similar problem What I did was to define a max number of cashed pages. So when reaching that number I simply did it the FIFO way -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Query-within-a-query with mySQL/PHP

2008-10-25 Thread Greg Bowser
>Basically I somehow need to do a GROUP BY producer, and yet somehow at the same time, find out all the matching vintages (years), that go along with that group and return them the same time the producer group is returned. If I'm following you correctly, you have a column "year" in your group, and

[PHP] Query-within-a-query with mySQL/PHP

2008-10-25 Thread Rob Gould
This is somewhat complicated, so I'll try to give examples with real- world data. Basically, I'd like to know how I could take data like this, from mySQL: 2006 Liberty School Central Coast, California, Central Coast, USA Chardonnay 2006 Liberty School Paso Robles, California, Central Coast, U

Re: [PHP] clear a mysql table

2008-10-25 Thread Daniel P. Brown
On Sat, Oct 25, 2008 at 11:02 AM, Ronald Wiplinger (Lists) <[EMAIL PROTECTED]> wrote: > > I plan therefore a web page, which is triggered by cron every hour and > will just clear the table. > > Can I use just: > mysql_query("DELETE FROM cash") > or die(mysql_error()); Please remember that GOOG

Re: [PHP] clear a mysql table

2008-10-25 Thread Richard Heyes
> or is there a better solution? Yes, look for a better hosting firm. 100Mb is paltry these days. -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (Updated October 25th) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.

Re: [PHP] clear a mysql table

2008-10-25 Thread tedd
At 11:02 PM +0800 10/25/08, Ronald Wiplinger (Lists) wrote: Can I use just: mysql_query("DELETE FROM cash") or die(mysql_error()); If you need to delete some cash, please look in my direction. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com

[PHP] clear a mysql table

2008-10-25 Thread Ronald Wiplinger (Lists)
I need to clear a table (cache) from a database based on the database size. Our web site uses cached pages. Our webhost only allow us 100 MB storage. Usually the database is just 10 MB, but when a search engine crawls our calendar, then the storage is quickly 108 MB. The system reports then mathem

RE: [PHP] Building an array, kind of?

2008-10-25 Thread Tom Shaw
Here's another easy way. $data = array(); while ($row = ifx_fetch_row ($charge_result2, "NEXT"){ $data[] = $row['id']; } ifx_free_result ($res_id); $comma_sep = implode(', ', array_values($data)); Thomas Shaw [EMAIL PROTECTED] -Original Message- From: Dan Shirah [mailto:

Re: [PHP] Building an array, kind of?

2008-10-25 Thread Martijn Korse
Or, if your mysql version allows it: SELECT 1, GROUP_CONCAT(some_col) FROM history GROUP BY 1 LIMIT 0,16 That would take away the need to create a comma seperated string in php, because mysql will have already done it for you ;-) Dan Shirah wrote: > > TGIF? > > Apparently my brain isn't work