Jump to content

Archived

This topic is now archived and is closed to further replies.

redarrow

*SOLVED* echo id with row statement how thank you.

Recommended Posts

I wont to echo all the ids with the row statement how.
thank you.

ps. somethink not in my learning cd please help.

example 1
[code]

for ($i=0; $i<count($result); $i++);
while($record=mysql_fetch_row($result){
$id=row['id'];

echo $id;
}
[/code]

example 2

[code]
while($record=mysql_fetch_row($result){
$id=row['id'];

echo $id;
}
[/code]

Share this post


Link to post
Share on other sites
[!--quoteo(post=363206:date=Apr 10 2006, 07:14 AM:name=AdamJ NZ)--][div class=\'quotetop\']QUOTE(AdamJ NZ @ Apr 10 2006, 07:14 AM) [snapback]363206[/snapback][/div][div class=\'quotemain\'][!--quotec--]
change mysql=fetch_row to mysql_fetch_row
[/quote]

sorry my fault in spelling still dosent show all the ids

Share this post


Link to post
Share on other sites
[code]
<?
$db=mysql_connect("localhost","xxxx","xxxx");
mysql_select_db("freedating",$db);
$query="select id from xxxx";
$result=mysql_query($query);
while($row=mysql_fetch_assoc($result)){


$id=$row["id"];

echo "$id<br>";
}

?>
[/code]

[!--sizeo:5--][span style=\"font-size:18pt;line-height:100%\"][!--/sizeo--]solved[!--sizec--][/span][!--/sizec--]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.