Jump to content

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


redarrow

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]
Link to comment
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
Link to comment
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--]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.