Thanks for everyones help with this one, all suggestions appreciated.
Cheers,
Jord
On Wednesday 04 April 2001 17:06, you wrote:
> Jordan,
>
> If you know your result is going to product one row, try using:
>
> $row=mysql_fetch_array($result, MSQL_ASSOC);
> // returns an assoc array where the fi
Looks reasonable enough
LeTourneau - hmmm - Longview, Texas?
Phil J.
Mark Roedel wrote:
> > -Original Message-
> > From: Jordan Elver [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 04, 2001 10:46 AM
> > To: PHP Database Mailing List; PHP General Mailing List
> > Subject: [PHP
Jordan,
If you know your result is going to product one row, try using:
$row=mysql_fetch_array($result, MSQL_ASSOC);
// returns an assoc array where the field names are keys, field value is
value
$id=row[id];
$name=row[name];
etc.
Best regards,
Andrew
--
And
> -Original Message-
> From: Jordan Elver [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 04, 2001 10:46 AM
> To: PHP Database Mailing List; PHP General Mailing List
> Subject: [PHP-DB] mysql_result()
>
>
> If I knnow that a query will only retrun one row, can I do
> this (below) ra
That didn't quite work, I tried using single quote enclose within double
quotes and it works.
$sqlstmt="SELECT * FROM dept WHERE shortname='$shortname'";
Thanks anyway
ben wrote:
> On Tue, 20 Mar 2001, Shahmat Dahlan wrote:
>
> > I'm trying to use mysql_result to extract data from one particul
I've tried what you suggested and it works, thanks.
Russ Michell wrote:
> Try:
>
> $sqlstmt="SELECT * FROM dept WHERE shortname='$shortname'";
> //Include single quotes..
>
> Russ
>
> #---#
>
> "Believe nothing - consider everything"
On Tue, 20 Mar 2001, Shahmat Dahlan wrote:
> I'm trying to use mysql_result to extract data from one particular field
> in a record. So I suppose the most viable solution is to use
> mysql_result. But when I do this:
>
> $sqlstmt="SELECT * FROM dept WHERE shortname=$shortname";
> $result=mysql_q