HOW DO U SPLIT UP LARGE STRINGS?
| From: | John Ryan | Date: | Sat, 16 Aug 2003 02:01:32 +0000 |
| Subject: | HOW DO U SPLIT UP LARGE STRINGS? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-159780@lists.php.net to get a copy of this message | ||
I've a string with a huge mySQL query, seperated by a semi-colon and then
line-break. You can't run this query staright to mySQL (and i dont want to
try), so Im trying to split up the query into, say, 100 mysql commands at a
time.
Is it possible to split up a string every 100 semi-colons it finds??
I input this string from a text file through fopen while(fgets)? Is it
easier to just read 100 lines at a time, run a query, and then read another
100 lines from the text file?
TIA