Jump to content


Photo

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


  • Please log in to reply
3 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 April 2006 - 07:09 AM

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

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

echo $id;
}

example 2

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

echo $id;
}

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 adamjnz

adamjnz
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts

Posted 10 April 2006 - 07:14 AM

change mysql=fetch_row to mysql_fetch_row

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 April 2006 - 07:21 AM

[!--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) View Post[/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
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 April 2006 - 07:39 AM

<?
$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>";
}

?>

[!--sizeo:5--][span style=\"font-size:18pt;line-height:100%\"][!--/sizeo--]solved[!--sizec--][/span][!--/sizec--]
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users