Jump to content

query problam


redarrow

Recommended Posts

Hi there all this is the page from the serach result code for some strange reason the information is pulling out one record and not all records.

i have two users in the database and i only get 1 out but doubled on the page any idears please cheers.

There is no sessions on the page so the visiting users can see all.

Advance thank you.

[code]
$query="select * from member_info";
$result=mysql_query($query);
while($record=mysql_fetch_assoc($result)){

// set verables to row

$name=($record["name"]);
$band_name=($record["band_name"]);
$music_played=($record["music_played"]);
$band_personalty=($record["band_personalty"]);
$date_added=($record["date_added"]);


$query="select * from members_picture_uploads";
$result=mysql_query($query);
while($pic=mysql_fetch_assoc($result)){
$picture=$pic["userfile_name"];
[/code]
Link to comment
https://forums.phpfreaks.com/topic/10051-query-problam/
Share on other sites

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

[code]
$query="select * from member_info";
$result=mysql_query($query);

while($row=mysql_fetch_assoc($result)){


$picture='select * from members_picture_uploads where id='.$row['id'].' ';

$data=mysql_query($picture);

while($pic=mysql_fetch_assoc($data)){

$link="<img width='150' src='members_uploads/".$pic["userfile_name"]."'>
</img>";
}

[/code]
Link to comment
https://forums.phpfreaks.com/topic/10051-query-problam/#findComment-37391
Share on other sites

Archived

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

×
×
  • 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.