Ask a Question related to PHP Development, Design and Development.
-
John #1
Parsing MySQL query return
Hey All,
I have a question regarding parsing text from a MySQL query. Basically, I
have several paragraphs of text in a field in MySQL. I run a query, get the
results, no problem. However, I would like to only display the first
paragraph of the data returned.
What is the best way to do this?
Thanks,
John
John Guest
-
PARSING A QUERY OF QUERY WITH A VARIABLE VALUE
On my first page the user selects a project. I am using the variable SelectedProject: <cfset SelectedProject =... -
Parsing return message from fetchmail
Hello, I was wondering if anyone knew of a perl module that could parse the return of a fetchmail. When fetchmail the unix command returns its... -
mySQL query taking too long to return
Greetings, I'm using mySQL in a VB.NET application, connecting it through the myOLEDB Provider. However, it's taking way too long to retrieve... -
MySQL Query Cache Not Working: MySQL 5 / Windows XP
Please excuse this post if you've already read it on mailing.database.mysql - i just discovered these other groups. future posts will be... -
error parsing dataset upon return from webservice
Found the problem shortly after posting: The submitted dataset had runtime properties added to some datacolumns (expressions added). These cause... -
Ewout De Boer #2
Re: [PHP] Parsing MySQL query return
----- Original Message -----
From: "John" <jpoz@quickscribble.com>
To: <php-general@lists.php.net>
Sent: Monday, July 28, 2003 8:22 PM
Subject: [PHP] Parsing MySQL query return
the> Hey All,
>
> I have a question regarding parsing text from a MySQL query. Basically, I
> have several paragraphs of text in a field in MySQL. I run a query, getThat depends on te format of the text/paragraphs in the mysql field.> results, no problem. However, I would like to only display the first
> paragraph of the data returned.
>
> What is the best way to do this?
How are the paragraphs separated ?
regards,
Ewout
Ewout De Boer Guest
-
John #3
Re: [PHP] Parsing MySQL query return
I'm using someone elses data here (inheriting). But it looks like it was
typed into the field, possibly using PHPMyADMIN. I would assume the
paragraphs are just seperated by carriage returns. Is there a way to tell
for sure?
John
"Ewout De Boer" <ewout@chemistry-interactive.nl> wrote in message
news:005901c3553a$0751eea0$0200410a@soyuz...I> ----- Original Message -----
> From: "John" <jpoz@quickscribble.com>
> To: <php-general@lists.php.net>
> Sent: Monday, July 28, 2003 8:22 PM
> Subject: [PHP] Parsing MySQL query return
>
>> > Hey All,
> >
> > I have a question regarding parsing text from a MySQL query. Basically,> the> > have several paragraphs of text in a field in MySQL. I run a query, get>> > results, no problem. However, I would like to only display the first
> > paragraph of the data returned.
> >
> > What is the best way to do this?
> That depends on te format of the text/paragraphs in the mysql field.
> How are the paragraphs separated ?
>
>
>
> regards,
> Ewout
>
John Guest
-
Nicholas Robinson #4
Re: [PHP] Parsing MySQL query return
If you assume either \n or \n\n as the para delimiters then you could use
strpos (see function.strpos.html) to work out where to split the text. If the
text field contents are huge, you might consider limiting the query results
by using left( field, size ) in the query.
KR
N
On Monday 28 Jul 2003 7:57 pm, Ewout de Boer wrote:> ----- Original Message -----
> From: "John" <jpoz@quickscribble.com>
> To: <php-general@lists.php.net>
> Sent: Monday, July 28, 2003 8:22 PM
> Subject: [PHP] Parsing MySQL query return
>>> > Hey All,
> >
> > I have a question regarding parsing text from a MySQL query. Basically, I
> > have several paragraphs of text in a field in MySQL. I run a query, get
> the
>>> > results, no problem. However, I would like to only display the first
> > paragraph of the data returned.
> >
> > What is the best way to do this?
> That depends on te format of the text/paragraphs in the mysql field.
> How are the paragraphs separated ?
>
>
>
> regards,
> EwoutNicholas Robinson Guest
-
Jason Wong #5
Re: [PHP] Parsing MySQL query return
On Tuesday 29 July 2003 04:16, John wrote:
Yes, examine the contents.> I'm using someone elses data here (inheriting). But it looks like it was
> typed into the field, possibly using PHPMyADMIN. I would assume the
> paragraphs are just seperated by carriage returns. Is there a way to tell
> for sure?
--
Jason Wong -> Gremlins Associates -> [url]www.gremlins.biz[/url]
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
[url]http://marc.theaimsgroup.com/?l=php-general[/url]
------------------------------------------
/*
I don't want to be young again, I just don't want to get any older.
*/
Jason Wong Guest



Reply With Quote

