the ids and images for the 2nd if statement are pulling the 1st record information to generate the record. how do i change this to where the if statement grabs the correct record and not the referring one.
thanks in advance for your help! -
<?php
-
$result = mysql_query("SELECT a.Id, a.Type,
-
a.Dates,
-
a.Uidfk as Uidfk,
-
b.Id as Did,
-
b.comment as Comment,
-
b.dates as Day,
-
b.sfk as Sfk ,
-
c.sfk as sfk1,
-
d.Memo as Memo,
-
d.Date as Dates1,
-
aes_decrypt(e.ProfileName, '$Ukey') as Name,
-
substr(i.Path, 4) as Path
-
FROM
-
asstatusupdate as a
-
left join asstatusdata as b
-
on a.id = b.sfk
-
left join asmanystatusupdate as c
-
on b.sfk = c.sfk
-
left join ascomments as d
-
on d.id = c.cfk
-
right join onlyonew_hquis.ASWebInfo as e
-
on e.Uidfk = a.uidfk
-
right join onlyonew_hqups.ASManyAlbums as f
-
on f.UserId=a.uidfk
-
right join onlyonew_hqups.ASAlbums as g
-
on f.AlbumId=g.Id
-
right join onlyonew_hqups.ASTitle as h
-
on g.Id=h.AlbumId
-
right join onlyonew_hqups.ASData as i
-
on h.Id=i.TitleId
-
where a.uidfk in (select friendid from onlyonew_hquis.asfriends where uidfk0='1') and i.DefaultProfilePic='Y' order by dates desc;
-
-
");
-
-
$result1 = mysql_query("SELECT a.Id, a.Type,
-
a.Dates,
-
a.Uidfk as Uidfk,
-
b.Id as Did,
-
b.comment as Comment,
-
b.dates as Day,
-
b.sfk as Sfk ,
-
c.sfk as sfk1,
-
d.Memo as Memo,
-
d.Date as Dates1,
-
aes_decrypt(e.ProfileName, '$Ukey') as Name,
-
substr(i.Path, 4) as Path
-
FROM
-
asstatusupdate as a
-
left join asstatusdata as b
-
on a.id = b.sfk
-
left join asmanystatusupdate as c
-
on b.sfk = c.sfk
-
left join ascomments as d
-
on d.id = c.cfk
-
right join onlyonew_hquis.ASWebInfo as e
-
on e.Uidfk = a.uidfk
-
right join onlyonew_hqups.ASManyAlbums as f
-
on f.UserId=a.uidfk
-
right join onlyonew_hqups.ASAlbums as g
-
on f.AlbumId=g.Id
-
right join onlyonew_hqups.ASTitle as h
-
on g.Id=h.AlbumId
-
right join onlyonew_hqups.ASData as i
-
on h.Id=i.TitleId
-
where a.uidfk in (select friendid from onlyonew_hquis.asfriends where uidfk0='1') and i.DefaultProfilePic='Y' and c.sfk = '$comment_id' order by dates desc;
-
");
-
-
$category_id = '';
-
-
while ($row = mysql_fetch_assoc($result)) {
-
if ($row['Id'] != $category_id) {
-
//Output the markup for a new category here.
-
$category_id = $row['Id'];
-
-
$Cat = $row['Type'];
-
$Memo = $row['Comment'];
-
$Did = $row['Did'];
-
$Dates = $row['Day'];
-
$Name = $row['Name'];
-
$Path = $row['Path'];
-
$FriendId = $row['Uidfk'];
-
-
echo '<table align="center" width="40%" border="3" cellpadding="0" cellspacing="0">';
-
echo '<tr>';
-
echo '<td align="center">'; echo "$Name"; echo "</br>"; echo '<a href="source/source.php?FriendId=' ."$FriendId". '"><img src="' ."$Path". '" height="120" width="120" align="middle" border="3" /></a>'; echo '</td>';
-
echo '<td align="center"> '; echo "$Dates" ; echo "</br>"; echo "</br>"; echo "$Cat"; //echo "</td>";
-
echo "</br>";
-
echo "$Memo"; echo '</td>'; // echo "</br>";
-
echo '<td>'; echo "$Did" ; echo '</td>';
-
echo '</tr>';
-
echo '</table>';
-
-
}
-
// Output comment markup here
-
// $comment_id = '';
-
//while ($row1 = mysql_fetch_assoc($result1)){
-
if(!empty($row['sfk1'])){
-
// $comment_id = $row['sfk1'];
-
-
$Fk = $row['sfk1'];
-
$Memo1 = $row['Memo'];
-
$FriendId1 = $row['Uidfk'];
-
$Dates1 = $row['Dates'];
-
$Path1 = $row['Path'];
-
-
// echo "$comment_id";
-
echo '<table align="center" width="500" border="3" cellpadding="7" cellspacing="0">';
-
echo '<tr>';
-
echo '<td align="center">'; echo "$Name"; echo "</br>"; echo '<a href="source/source.php?FriendId=' ."$FriendId1". '"><img src="' ."$Path1". '" height="120" width="120" align="middle" border="3" /></a>'; echo '</td>';
-
echo '<td>'; echo "$Fk"; echo '</td>';
-
// echo "</br>";
-
echo '<td align="center">'; echo "$Dates1"; echo "</br>"; echo "</br>"; echo "$Memo1"; echo '</td>';
-
// echo "</br>";
-
echo '</tr>';
-
echo '</table>';
-
-
} // closing if
-
// } // closing while
-
} // closing main
-
?>
-
0 972 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Anthony Delorenzo |
last post by:
Please refer to http://www.sfu.ca/~ajdelore/
Stylesheet: http://www.sfu.ca/~ajdelore/anthony.css
I am having a problem that I assume is a browser-specific glitch.
When I load the above page in...
|
by: Tyrone Slothrop |
last post by:
I am coding a site which involves uploading images. All of the PHP
and display is OK but the client wants to be able to display the image
thumbnail on the upload page and show the full image on...
|
by: Qindong Z. |
last post by:
My asp.net application send image to web browser. The browser begin to display part of image before download finished. (In Slow Network). How can I force brower to display image after the image fully...
|
by: Brett Romero |
last post by:
My application start like this:
frmMaster MainForm = new frmMaster();
System.Windows.Forms.Application.Run(MainForm);
The flow is that MainForm shows then a SecondForm shows after the user...
|
by: cjaserver |
last post by:
This works fine in IE, but is breaking in Firefox, and reported in
Netscape as well. I can't determine why.
http://www.chartermainstreetgld.com
click on the real estate section on the left nav...
|
by: JebBushell |
last post by:
Here are two lines from the HTML view of my page that should display the same
jpg:
<asp:Image id="Image2" ImageUrl="~/SpotImages/paw.jpg" width="16"
height="16" runat="server"></asp:Image>
...
|
by: tshad |
last post by:
This was posted before but the message got messed up (all NLs were stripped
out for some reason).
I have 2 labels that hold the name of different images on my .aspx page.
<asp:Label ID="Logo"...
|
by: adubra |
last post by:
Hi there,
I am using a device context (DC) and a buffer to successfully draw to screen. However, when I update the DC at very high frame rate and drag the frame containing the image very quickly...
|
by: shotokan99 |
last post by:
i have this issue:
showpic.php
================================================
$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $xmyurl);
curl_setopt ($ch,...
|
by: viji chandran |
last post by:
Hi...
I am developing an application in .Net 2005 which
has a DataGridView, like Microsoft outlook. I want
to mark read and unread for each mail. I am trying
to put one image for...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |