Re: [PHP-DB] mysql_result()

2001-04-05 Thread Jordan Elver
Infrastructure Technology > http://www.openlinksw.com > > -Original Message- > > > From: Jordan Elver [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, April 04, 2001 11:46 AM > > To: PHP Database Mailing List; PHP General Mailing List > > Subject: [PHP-DB] mysql_res

Re: [PHP-DB] mysql_result()

2001-04-04 Thread Phil Jackson
Mailing List > > Subject: [PHP-DB] mysql_result() > > > > > > If I knnow that a query will only retrun one row, can I do > > this (below) rather than using a while loop for one record? > > > > $id = @mysql_result($result, 0, 'id'); > > $name

RE: [PHP-DB] mysql_result()

2001-04-04 Thread Andrew Hill
ling List > Subject: [PHP-DB] mysql_result() > > > Hi, > If I knnow that a query will only retrun one row, can I do thiss (below) > rather than using a while loop for one record? > > $id = @mysql_result($result, 0, 'id'); > $name = @mysql_result($result, 0

RE: [PHP-DB] mysql_result()

2001-04-04 Thread Mark Roedel
> -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,

[PHP-DB] mysql_result()

2001-04-04 Thread Jordan Elver
Hi, If I knnow that a query will only retrun one row, can I do thiss (below) rather than using a while loop for one record? $id = @mysql_result($result, 0, 'id'); $name = @mysql_result($result, 0, 'name'); $email = @mysql_result($result, 0, 'email'); $address1 = @mysql_result($result, 0, 'addres

Re: [PHP-DB] mysql_result

2001-03-20 Thread Shahmat Dahlan
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

Re: [PHP-DB] mysql_result

2001-03-20 Thread Shahmat Dahlan
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"

Re: [PHP-DB] mysql_result

2001-03-20 Thread ben
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

[PHP-DB] mysql_result

2001-03-20 Thread Shahmat Dahlan
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_query($sqlstmt); $temp=mysql_result($result,0,"shortname"