Jump to content

REOL

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

REOL's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. anyone know how to display two outputs, then add a row, and then continue with the array/ -ps
  2. thanks! it didnt originally work but this worked instead echo '<h1>Properties in ' . $results[0]['city'] . ', ' . $results[0]['state'] . '</h1>'; ... know how to display two results, then add a row then display the next two results after that? -ps
  3. yes i know i just put it like that so you can see the code properlly! -ps
  4. i want to have the "<h1>" tags only display once. I am having trouble setting an array for it. can someone help me out? also how do i display a reuslt twice, add a row, then display again? [code]<?php include_once( "format.php" ); $city = $_GET['city']; if ($city) : $query = "SELECT * FROM properties WHERE city='$city' ORDER BY propid"; $results = pgdbsql( $query, "my_table" ); ?> <?php foreach ( $results as $result ) { ?> <h1>Properties in <?php= $result['city'] ?>, <?php= $result['state']?></h1> <table cellspacing=2 cellpadding=1 border=0>   <tr> <td vAlign=top><a href="property_overview.php?propid=<?php= $result['propid'] ?>"> <?php if(file_exists("img_property/{$result['propid']}_thumb.gif")) { ?> <img src="img_property/<?php= $result['propid'] ?>_thumb.gif" border=0> <?php } else { ?> <img src="img_property/prop_na.jpg" border=0> <?php } ?> </a></td> <td class=tiny vAlign=top><span class=tiny_red><?php= $result['name'] ?></span><br /><?php= $result['address'] ?><p><img src="img_property/icon_<?php= $result['type'] ?>.gif" border=0></td>   </tr> </table> <?php } endif; ?>[/code]
  5. tried to put it in but something doesnt seem to work. ill keep crackin at it and i think you got me in the right direction. thanks for all help! -ps
  6. ive tried several ways, but its not working :/ is there another way? or someone help me out here? thanks
  7. last time im uppin this ! please any assistance? -ps
  8. testpage is here: http://reol.com/slgreen/test.php just choose a property or district and search. youll see the print_r and results below it.. and from there youll know what im talking about. thanks for your time. -ps
  9. i wanted to use the whereAdd funtion i believe? as well as fetch() ? ? so basically, there are multiple $spaces for each $property_id, i want to show the top table once, which outputs the $property_id ONCE, and show each $space according to the property_id so the output would be like: property_id (1) space space space space property_id (2) space space space AND NOT property_id (1) space property_id (1) space property_id (2) space property_id (2) space
  10. This form finds property availabilities from a database and displays it. currently it outputs the *TOP TABLE(property)* and *BOTTOM TABLE (spaces available in the property)*  together on each result. but i only want display the *BOTTOM TABLE* multiple times for each space. hope i can get some quicck help on this. [code] <!--results --> <?php if( $_GET['district_id'] && $_GET['district_id'][0] != 'all' ) { $district_id = $_GET['district_id']; $minRentSq = $_GET['minimum_rent']; $maxRentSq = $_GET['maximum_rent']; $minSq = $_GET['minimum_space']; $officeBool = $_GET['isRetail']; $preBuiltBool = $_GET['isPrebuilt']; $sort_field = $_GET['sort_field']; $spaces = getSpacesByDistrict( $district_id, $minRentSq, $maxRentSq, $minSq, $officeBool, $preBuiltBool, $sort_field); echo "<pre>"; print_r( $spaces ); echo "</pre>"; } else if( $_GET['property_id'] && $_GET['property_id'][0] != 'all' ) { $property_id = $_GET['property_id']; $minRentSq = $_GET['minimum_rent']; $maxRentSq = $_GET['maximum_rent']; $minSq = $_GET['minimum_space']; $officeBool = $_GET['isRetail']; $preBuiltBool = $_GET['isPrebuilt']; $sort_field = $_GET['sort_field']; $spaces = getSpacesByProperty( $property_id, $minRentSq, $maxRentSq, $minSq, $officeBool, $preBuiltBool, $sort_field); echo "<pre>"; print_r( $spaces ); echo "</pre>"; } ?> <br><br><img src="images/headers/hd_leasing_availableSR.gif" width="523" height="15"><br><br> <table> <tr> <td valign="middle"><input type="image" border="0" alt="Print Results" src="images/misc/printResults.gif"></td> <td><img src="images/null.gif" width="12"></td> <td valign="middle"> <span class="foundtext"><?php= count($spaces) ?> leases available at <?php= $space['address'] ?></span><br><a class="small" href="#top">Refine Search</a></td> </tr> </table> <?php foreach ($spaces as $space) { ?> <!-- **************************TOP TABLE************************* --> <table border="0" width="500" cellpadding="2" cellspacing="1"> <tr> <td colspan="2"><span class="leaseTitle"><?= $space['address'] ?></span></td> </tr> <tr> <td valign="top" align="right" class="leaseInfo">District:</td> <td class="leaseText" valign="top"><?php= $space['name'] ?></td> </tr> <tr> <td valign="top" class="leaseInfo" align="right">Contacts:</td> <td class="leaseText" valign="top"><a class="hplink" href="mailto:howard.tenenbaum@slgreen.com">Howard J. Tenenbaum</a>, 212-216-1685 (SL Green Leasing, LLC)<br><a class="hplink" href="mailto:gary.rosen@slgreen.com">Gary M. Rosen</a>, 212-216-1687 (SL Green Leasing, LLC)<br></td> </tr> </table> <br /> <a href="property.php?id=<?php= $space['id'] ?>"><input class="button" type="button" value="Detailed Property Information" onClick="document.location.href='property.php?id=<?php= $id ?>';"></a> <br /><br /><br /> <!-- **************************  END TOP TABLE  ************************* --> <!-- **************************BOTTOM TABLE************************* --> <table width="500" cellpadding="1" cellspacing="1" border="0"> <tr align="center" bgcolor="#666666"> <td class="smtypeWt">Floor<br><img src="images/gresources/x.gif" alt="SL Green" width="65" height="1" border="0"><br></td> <td class="smtypeWt">Suite<br><img src="images/gresources/x.gif" alt="SL Green" width="60" height="1" border="0"><br></td> <td class="smtypeWt">Square<br>Feet<br><img src="images/gresources/x.gif" alt="SL Green" width="50" height="1" border="0"><br></td> <td class="smtypeWt">Available<br><img src="images/gresources/x.gif" alt="SL Green" width="60" height="1" border="0"><br></td> <td class="smtypeWt">Rent/SF<br><img src="images/gresources/x.gif" alt="SL Green" width="60" height="1" border="0"><br></td> <td class="smtypeWt">Term<br><img src="images/gresources/x.gif" alt="SL Green" width="45" height="1" border="0"><br></td> <td class="smtypeWt">Direct/<br>Sublet<br><img src="images/gresources/x.gif" alt="SL Green" width="60" height="1" border="0"><br></td> <td class="smtypeWt">Retail/<br>Office<br><img src="images/gresources/x.gif" alt="SL Green" width="50" height="1" border="0"><br></td> <td class="smtypeWt">Prebuilt<br><img src="images/gresources/x.gif" alt="SL Green" width="50" height="1" border="0"><br></td> </tr> <?php $bgcolor = ($bgcolor == "#99CCFF") ? "#ccccFF" : "#99CCFF"; ?> <tr bgcolor="<?php= $bgcolor ?>"> <td align="right" class="smtype" valign="top"><?php= $space['floor']  ?></td> <td class="smtype" valign="top"><?php= $space['suite'] ?></td> <td align="right" class="smtype" valign="top"><?php= $space['sqfeet'] ?></td> <td align="center" class="smtype" valign="top"><?php= $space['availability'] ?> <img src="/images/null.gif" width="1" height="1"></td> <td align="right" class="smtype" valign="top"><?php= $space['rentsqfeet'] ?></td> <td align="right" class="smtype" valign="top"><?php= $space['term'] ?><img src="/images/null.gif" width="1" height="1"></td> <td align="center" class="smtype" valign="top"><?php= $space['issublet'] ?></td> <td align="center" class="smtype" valign="top"><?php= $space['isretail'] ?></td> <td align="center" class="smtype" valign="top"><?php= $space['isprebuilt'] ?></td> </tr> <tr bgcolor="<?= $bgcolor ?>"><td align="left" class="smtype" valign="Top" colspan="9"> <?php= $space['notes'] ?></td> </tr> <tr bgcolor="<?php= $bgcolor ?>"><td colspan="9" class="smtype"><a class="hplink" href="#" onClick="window.open('floorplan.php?spaceid=$space_id','spacewin','toolbar=no,status=no,directories=no,scrollbars=yes');">Floorplans</a></td> </tr> <tr align="center"> <td class="smtype" colspan="9"><img src="images/gresources/x.gif" width="1" height="4" border="0"></td> </tr> <?php }  ?> </table> <!-- **************************END BOTTOM TABLE************************* -->[/code]
  11. thanks a lot. i had that before but the data i was looking for didnt show. but now it works. ' -ps
  12. [code]function getCorporateProfile() { $query = "SELECT * FROM feature, featuretype WHERE feature.featuretypeid = featuretype.id AND featuretype.name = 'corporateprofile'"; $result = pgdbsql( $query, "adminssssss" ); return $result; } [/code] that is my function above how do i just call and run it?
×
×
  • 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.