Hi,
Suppose you have a table students:
student_id / student_name / GPA

here is the code:

$sql = "select * 
        from students";

$result = mysql_query($sql);
 while(list($student_id,
$student_name,$gpa)=mysql_fetch_array($result) {

echo $student_name." has a GPA of".$gpa."<BR>";

}
     
btw, this is something really basic, you should be able to
go to the php.net and read the documentation. there are
great examples.



--- Alex Shi <[EMAIL PROTECTED]> wrote:
> Yesterday I posted a question yet got response. The
> question 
> is regarding to how Query works. Now I repost it in a
> more 
> specific way.
> 
> I am just wondering how MySQL API functions work. Let's
> look
> at following two functions:
> 
> 1. mysql_query(), 
> 2. mysql_fetch_array()
> 
> To my understanding, mysql_query() will definately to its
> job with
> MySQL server. But how about the latter? Does it just
> fetch data
> from client/local buffer, which is previously put in by
> mysql_query(), 
> or still has to goto server side to fetch data?
> 
> Alex
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


=====
Mehmet Erisen
http://www.erisen.com

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to