Jump to content

wchamber22

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Everything posted by wchamber22

  1. Hi JC, I know exactly which line you are talking about! Deleted it and bingo all results display correctly, thanks for tip. YOU DA MAN. Sincerely, Bill
  2. MJ, Almost there! It is displaying the plants names in columns just as I pictured via your code, except that it is not displaying the first result of the query. Every other database result thereafter displays perfectly! MAN, my code was way off earlier! I am a landscaper trying to showcase plant information on our website to become a leader in the area of plant expertise. If you are in or around the Central IL area I will get you some plants for your garden if you would like. Nice work, and I am sure I'll have more questions.
  3. Hi, I would like to display my master details page links to the details pages in three columns rather than a single column. Below is the do-while code I have thus far, and I am stuck. Could someone please mock up this code quick, because I know it is a simple syntax error somewhere. <?php do { echo "<table border='0'>"; for ($y=1; ; $y++) { echo "<tr>"; for ($x=1; $x<=3; $x++) { echo "<td align='left'><a href="plantdetails.php?recordID=echo $row_rsBotanicalA['PlantID'];">; echo $row_rsBotanicalA['BotanicalName']; </a></td>" } echo "</tr>"; } } while ($row_rsBotanicalA = mysql_fetch_assoc($rsBotanicalA)); echo "</table>"; ?>
  4. Hi litebearer, I have played around with the code via your link, and still haven't had success. Some further assistance is needed. I am a rookie and have no shame in copying and pasting code. I just can't put everything together! Sorry. Bill C.
  5. Hi, I am stuck. I have used dreamweaver to create a master details page with links to the details page successfully, but I would like to display the master details page results in 3 columns rather than the 1 column that dreamweaver defaults. As the site becomes richer the content will increase yielding many results, therfore the content displayed in a single column will require the users to scroll way down the page. So, as it is now the results display as follows: Plant1 Plant2 Plant3 Plant4 Plant5 Plant6 Plant7 Plant8 Plant9 etc... I would like them to display as follows: Plant1 Plant4 Plant7 Plant2 Plant5 Plant8 Plant3 Plant6 Plant9 Here is my code thus far: <?php require_once('Connections/connGND.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_connGND, $connGND); $query_rsBotanicalA = "SELECT * FROM plants WHERE CatIDB = 'A'"; $rsBotanicalA = mysql_query($query_rsBotanicalA, $connGND) or die(mysql_error()); $row_rsBotanicalA = mysql_fetch_assoc($rsBotanicalA); $totalRows_rsBotanicalA = mysql_num_rows($rsBotanicalA); ?> <table border="0" align="left"> <?php do { ?> <tr> <td align="left"><a href="plantdetails.php?recordID=<?php echo $row_rsBotanicalA['PlantID']; ?>"> <?php echo $row_rsBotanicalA['BotanicalName']; ?> </a></td> </tr> <?php } while ($row_rsBotanicalA = mysql_fetch_assoc($rsBotanicalA)); ?> </table> Could someone help me to write this code, as I have been unsuccessful maintaining the links. I have been able get the results to display in the columsn as I would like, but I haven't been able to figure it out while maintaining the links! Thanks.
×
×
  • 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.