Jump to content

wizardry

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.only1wizard.com

Profile Information

  • Gender
    Not Telling

wizardry's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i've tried what you showed and that was for the wrong query of which that did work for the parent query. when i tried to move this to the above position of: echo '<tr>'; echo '<td colspan="4" style="padding-left:1em;">'; // display table echo '<a href="#0'."$SFK1".'" onclick="toggle_visibility(\'foo1'\');" ;return false\" style=\"position:relative\">Click here to show records</a>'; // to show comment records //echo '<div id="foo1'."$SFK1".'"style="position:relative;display:none">'; // to show comment records echo '<table align="center" width="60%" border="3" cellpadding="0" cellspacing="0" id="foo1">'; while($user_row = mysql_fetch_array($statusComments)){ my code went to the left side of the screen and was nolonger apart of the table. in my current design in order to have my data elements in one table ive had to use a nested table of which is in the subquery. thanks in advance for your help!
  2. i've tried what you've explained to me. here is the code that i used can you show me an example? thanks in advance for your help! echo '<a href="#0'."$SFK1".'" onclick="toggle_visibility(\'foo0'."$SFK1".'\');" ;return false\" style=\"position:relative\">Click here to show records</a>'; // to show comment records //echo '<div >'; // to show comment records echo '<table align="center" width="60%" border="3" cellpadding="0" cellspacing="0" id="foo0'."$SFK1".'"style="position:relative;display:none">'; [attachment deleted by admin]
  3. i've tried that with both the table and the div they both have id with the record number which make them unique considering that they are being looped until there are no more matching records. Niether of them work just single record display.
  4. i have the onclick function created already. it shows the results but only 1 result at a time. for instance their are 5 records it only shows 1 record.
  5. how do i get this to loop through all record sets instead of just showing one record set on click for sub query? <script type="text/javascript"> <!-- function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; } //--> </script> </head> <body> <?php //c.sfk={$row['sfk']} mysql_select_db($database_Del_Comments, $Del_Comments); $result = sprintf("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 , 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 right join ASWebInfo as e on e.Uidfk = a.uidfk right join ASManyAlbums as f on f.UserId=a.uidfk right join ASAlbums as g on f.AlbumId=g.Id right join ASTitle as h on g.Id=h.AlbumId right join ASData as i on h.Id=i.TitleId where a.uidfk in (select friendid from asfriends where uidfk0='1') and i.DefaultProfilePic='Y' order by dates desc; "); $statusUpdate = mysql_query($result, $Del_Comments) or die(mysql_error()); $category_id = ''; echo '<table align="center" width="40%" border="3" cellpadding="0" cellspacing="0">'; while($row = mysql_fetch_array($statusUpdate)) { if ($row['Id'] != $category_id) { $category_id = $row['Id']; // grab table variables $Type = $row['Type']; $Dates = $row['Dates']; $Comment = $row['Comment']; $Name = $row['Name']; $Path = $row['Path']; $FriendId = $row['UIdFk']; $SFK = $row['Sfk']; echo '<tr>'; echo ' <td align="center">', $Name, '<br><a href="source/source.php?FriendId=',$FriendId,'"><img src="',$Path,'" height="120" width="120" align="middle" border="3" /></a></td>'; echo ' <td align="center"> ',$Dates,'<br><br>',$Type,'<br/>',$Comment,'</td>'; echo ' <td>',$category_id,'</td>'; echo ' <td>',$SFK,'</td>'; echo '</tr>'; } // end of if mysql_select_db($database_Del_Comments, $Del_Comments); $comments= sprintf("SELECT c.sfk as sfk1, c.UIdFk0, d.Memo as Memo, d.Date as Dates1, e.ProfileName, substr(i.Path, 4) as Path FROM asmanystatusupdate as c left join ascomments as d on d.id = c.cfk right join ASWebInfo as e on e.Uidfk = c.uidfk0 right join ASManyAlbums as f on f.UserId=c.uidfk0 right join ASAlbums as g on f.AlbumId=g.Id right join ASTitle as h on g.Id=h.AlbumId right join ASData as i on h.Id=i.TitleId where c.sfk={$row['Sfk']} AND c.uidfk0 in (select friendid from asfriends where uidfk0='1') and i.DefaultProfilePic='Y' order by dates desc; "); $statusComments = mysql_query($comments, $Del_Comments) or die(mysql_error()); while($user_row = mysql_fetch_array($statusComments)){ // test the query //if($row['sfk'] == $user_row['sfk']) { $Dates1 = $user_row['Dates1']; $Memo = $user_row['Memo']; $Name1 = $user_row['Name']; $Path1 = $user_row['Path']; $FriendId1 = $user_row['UIdFk0']; $SFK1 = $user_row['sfk1']; //row and cell for "outer" while echo '<tr>'; echo '<td colspan="4" style="padding-left:1em;">'; // display table echo '<a href="#0'."$SFK1".'" onclick="toggle_visibility(\'foo1'."$SFK1".'\');" ;return false\" style=\"position:relative\">Click here to show records</a>'; // to show comment records echo '<div id="foo1'."$SFK1".'"style="position:relative;display:none">'; // to show comment records echo '<table align="center" width="60%" border="3" cellpadding="0" cellspacing="0">'; echo '<tr>'; echo ' <td align="center">',$Name1,'<br/><a href="source/source.php?FriendId=',$FriendId1,'"><img src="',$Path1,'" height="120" width="120" align="middle" border="3" /></a></td>'; echo ' <td align="center" width="40%"> ',$Dates1,'<br/><br/><br/>',$Memo,'</td>'; echo ' <td>' ,$category_id, '</td>'; echo ' <td>',$SFK1,'</td>'; echo '</tr>'; echo '</table>'; echo '</div>'; // for comment results show query //end row and cell for outer while //echo '</td>'; //echo '</tr>'; echo '<form action="$editFormAction" method="post" name="form1" id="form1">'; echo '<a href="#'."$SFK1".'" onclick="toggle_visibility(\'foo'."$SFK1".'\');" ;return false\" style=\"position:relative\">Click here to toggle visibility of element #foo</a>'; echo '<div id="foo'."$SFK1".'"style="position:relative;display:none">';echo '<table align="center">'; echo '<tr valign="baseline">'; echo '<td nowrap="nowrap" align="right">Memo:</td>'; echo '<td><input type="text" name="Memo" value="" size="32" /></td>'; echo '</tr>'; echo '<tr valign="baseline">'; echo '<td nowrap="nowrap" align="right"> </td>'; echo ' <td nowrap="nowrap" align="right"> </td>'; echo ' </tr>'; echo '<tr valign="baseline">'; echo ' <td nowrap="nowrap" align="right"> SFK:' ."$SFK1". '</td>'; echo ' <td><input type="submit" value="Insert record" /></td>'; echo ' </tr>'; echo ' </table>'; echo '<input type="hidden" name="Id" value="" />'; echo '<input type="hidden" name="Id" value="" />'; echo ' <input type="hidden" name="SFk" value="' ."$SFK1". '" />'; echo ' <input type="hidden" name="MM_insert" value="form1" />'; echo '</form>'; echo '</div>'; } // end of if } // end of while loop }// end of main loop echo '</table>'; ?>
  6. how do i get this insert form to display for the results record id 1 once and record id 2 once instead of looping though all of foreign keys for record 1. this is in refferance to the code for sub query insert form on click. for example: i have 10 records for record id 1 then the last record for 1 id is 10 that should show the insert form. instead of having all 10 records showing the form. here is an example: www.only1wizard.com/UntitledDocument.pdf thanks in advance for your help! <script type="text/javascript"> <!-- function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; } //--> </script> </head> <body> <?php //c.sfk={$row['sfk']} mysql_select_db($database_Del_Comments, $Del_Comments); $result = sprintf("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 , 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 right join ASWebInfo as e on e.Uidfk = a.uidfk right join ASManyAlbums as f on f.UserId=a.uidfk right join ASAlbums as g on f.AlbumId=g.Id right join ASTitle as h on g.Id=h.AlbumId right join ASData as i on h.Id=i.TitleId where a.uidfk in (select friendid from asfriends where uidfk0='1') and i.DefaultProfilePic='Y' order by dates desc; "); $statusUpdate = mysql_query($result, $Del_Comments) or die(mysql_error()); $category_id = ''; echo '<table align="center" width="40%" border="3" cellpadding="0" cellspacing="0">'; while($row = mysql_fetch_array($statusUpdate)) { if ($row['Id'] != $category_id) { $category_id = $row['Id']; // grab table variables $Type = $row['Type']; $Dates = $row['Dates']; $Comment = $row['Comment']; $Name = $row['Name']; $Path = $row['Path']; $FriendId = $row['UIdFk']; $SFK = $row['Sfk']; echo '<tr>'; echo ' <td align="center">', $Name, '<br><a href="source/source.php?FriendId=',$FriendId,'"><img src="',$Path,'" height="120" width="120" align="middle" border="3" /></a></td>'; echo ' <td align="center"> ',$Dates,'<br><br>',$Type,'<br/>',$Comment,'</td>'; echo ' <td>',$category_id,'</td>'; echo ' <td>',$SFK,'</td>'; echo '</tr>'; } // end of if mysql_select_db($database_Del_Comments, $Del_Comments); $comments= sprintf("SELECT c.sfk as sfk1, c.UIdFk0, d.Memo as Memo, d.Date as Dates1, e.ProfileName, substr(i.Path, 4) as Path FROM asmanystatusupdate as c left join ascomments as d on d.id = c.cfk right join ASWebInfo as e on e.Uidfk = c.uidfk0 right join ASManyAlbums as f on f.UserId=c.uidfk0 right join ASAlbums as g on f.AlbumId=g.Id right join ASTitle as h on g.Id=h.AlbumId right join ASData as i on h.Id=i.TitleId where c.sfk={$row['Sfk']} AND c.uidfk0 in (select friendid from asfriends where uidfk0='1') and i.DefaultProfilePic='Y' order by dates desc; "); $statusComments = mysql_query($comments, $Del_Comments) or die(mysql_error()); while($user_row = mysql_fetch_array($statusComments)){ // test the query //if($row['sfk'] == $user_row['sfk']) { $Dates1 = $user_row['Dates1']; $Memo = $user_row['Memo']; $Name1 = $user_row['Name']; $Path1 = $user_row['Path']; $FriendId1 = $user_row['UIdFk0']; $SFK1 = $user_row['sfk1']; //row and cell for "outer" while echo '<tr>'; echo '<td colspan="4" style="padding-left:1em;">'; // display table echo '<a href="#0'."$SFK1".'" onclick="toggle_visibility(\'foo1'."$SFK1".'\');" ;return false\" style=\"position:relative\">Click here to show records</a>'; // to show comment records echo '<div id="foo1'."$SFK1".'"style="position:relative;display:none">'; // to show comment records echo '<table align="center" width="60%" border="3" cellpadding="0" cellspacing="0">'; echo '<tr>'; echo ' <td align="center">',$Name1,'<br/><a href="source/source.php?FriendId=',$FriendId1,'"><img src="',$Path1,'" height="120" width="120" align="middle" border="3" /></a></td>'; echo ' <td align="center" width="40%"> ',$Dates1,'<br/><br/><br/>',$Memo,'</td>'; echo ' <td>' ,$category_id, '</td>'; echo ' <td>',$SFK1,'</td>'; echo '</tr>'; echo '</table>'; echo '</div>'; // for comment results show query //end row and cell for outer while //echo '</td>'; //echo '</tr>'; echo '<form action="$editFormAction" method="post" name="form1" id="form1">'; echo '<a href="#'."$SFK1".'" onclick="toggle_visibility(\'foo'."$SFK1".'\');" ;return false\" style=\"position:relative\">Click here to toggle visibility of element #foo</a>'; echo '<div id="foo'."$SFK1".'"style="position:relative;display:none">';echo '<table align="center">'; echo '<tr valign="baseline">'; echo '<td nowrap="nowrap" align="right">Memo:</td>'; echo '<td><input type="text" name="Memo" value="" size="32" /></td>'; echo '</tr>'; echo '<tr valign="baseline">'; echo '<td nowrap="nowrap" align="right"> </td>'; echo ' <td nowrap="nowrap" align="right"> </td>'; echo ' </tr>'; echo '<tr valign="baseline">'; echo ' <td nowrap="nowrap" align="right"> SFK:' ."$SFK1". '</td>'; echo ' <td><input type="submit" value="Insert record" /></td>'; echo ' </tr>'; echo ' </table>'; echo '<input type="hidden" name="Id" value="" />'; echo '<input type="hidden" name="Id" value="" />'; echo ' <input type="hidden" name="SFk" value="' ."$SFK1". '" />'; echo ' <input type="hidden" name="MM_insert" value="form1" />'; echo '</form>'; echo '</div>'; } // end of if } // end of while loop }// end of main loop echo '</table>'; ?>
  7. yes i would like to know what your thoughts are.
  8. here is the login information for the demo account. the user name: demo@only1wizard.com the password: DE20mo11
  9. My loop for the comments image is not displaying the users image and name it loops and displays the first one ( image for that record set ). 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; "); $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 if(!empty($row['sfk1'])){ $Fk = $row['sfk1']; $Memo1 = $row['Memo']; $FriendId1 = $row['Uidfk']; $Dates1 = $row['Dates']; $Path1 = $row['Path']; 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>'; } } ?>
  10. its my own error it was echo ../directoryname when its not in the sub domains im still developing it.
  11. i have another problem; the image is not displaying its just showing the border. ii know the image path is being caught in the variable. i just dont understand 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, aes_decrypt(e.ProfileName, '$Ukey') as Name, i.Path 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='1' and i.DefaultProfilePic='Y'; "); $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 "$Cat"; echo "</td>"; // echo "</br>"; echo '<td>' ; echo "$Memo"; echo '</td>'; // echo "</br>"; echo '<td>'; echo "$Did" ; echo '</td>'; echo '<td>'; echo "$Dates" ; echo '</td>'; echo '</tr>'; echo '</table>'; } // Output comment markup here $Fk = $row['sfk1']; $Memo1 = $row['Memo']; echo '<table align="center" width="500" border="3" cellpadding="7" cellspacing="0">'; echo '<tr>'; echo '<td>'; echo "$Fk"; echo '</td>'; // echo "</br>"; echo '<td>'; echo "$Memo1"; echo '</td>'; // echo "</br>"; echo '</tr>'; echo '</table>'; } ?>
  12. im creating a social networking site like facebook, myspace. looking for some suggestions. the web site is: www.only1wizard.com
  13. i got it i had to remove the <br> thanks for your help.
  14. here is the code i'm trying to get a table displaying correctly it has spacers between records. thanks in advance for your help. <?php $result = mysql_query("SELECT a.id as id, a.catagory as cat, a.memo as memo, a.dates as day, b.fk as fk, b.memo as memo1 FROM type as a left join memo as b on a.id = b.fk "); $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['cat']; $Memo = $row['memo']; echo '<table align="center" width="500" border="3" cellpadding="0" cellspacing="0">'; echo '<tr>'; echo '<td> '; echo "$Cat"; echo "</td>"; echo "</br>"; echo '<td>' ; echo "$Memo"; echo '</td>'; echo "</br>"; echo '</tr>'; // echo '</table>'; } // Output comment markup here $Fk = $row['fk']; $Memo1 = $row['memo1']; // echo '<table align="center" width="500" border="3" cellpadding="0" cellspacing="0">'; echo '<tr>'; echo '<td>'; echo "$Fk"; echo '</td>'; echo "</br>"; echo '<td>'; echo "$Memo1"; echo '</td>'; echo "</br>"; echo '</tr>'; echo '</table>'; } ?>
×
×
  • 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.