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