Jump to content

thunderousity

Members
  • Posts

    40
  • Joined

  • Last visited

Everything posted by thunderousity

  1. I've been beavering away with all things Wordpress and plugins etc The plugin I have installed and configured is great apart from an annoying issue with the sidebar and thumbnails not showing (Latest Classifieds) in IE8, but renders fine in other browsers. It doesn't look like there is an imminent release of a new version of the plugin so I'm trying to fix it myself. It's probably something simple but I can't see the wood for the trees. http://www.autosnout.com/For-Sale/car-classifieds/
  2. Yes you're correct - deleted the extra mysql_fetch_assoc and it works brilliantly - fantastic - thanks for the help :-)
  3. This works a treat - I've managed to tweak it slightly so it works for my descending mysql list by (amongst other things) changing the $min from 0 to 290 as I know that the highest value will be less than 280. I've also managed to incorporate my css alternating row color for the results. However, the results always miss the very first row from the resultset. The highest value was 273 but this was omitted, I added the value of 275 to the database table and the 273 now appears but not 275!? <?php$min = 290;$increment = 10;$max = $min - $increment;$rowclass = 0; while ($row_result = mysql_fetch_assoc($result)){ if ($row_result['number'] < $max) { while ($max > $row_result['number']) $max -= $increment; $min = $max + $increment;echo "<br>"; echo "<h3 class='listrow'>Between ".$min." and ".$max."</h3>";} echo "<div class= row" . $rowclass . "><div class='alignleft'><a title=" . $row_result['number'] . "text href=page.php?ID=" . $row_result['ID'] . ">" .$row_result['number'] . "</a></div><div class='alignright'>more text - <b>" . $row_result['number'] . "</b></div><div style='clear: both;'></div></div>";$rowclass = 1 - $rowclass;}?>
  4. I've not had chance to test this until I get home, but would something along these lines work using a 'while' statement rather than an 'if' $min = 0$max = 10$increment = 10$number = $row_result while (($number >= $min) && ($number <= $max)){echo "<h1>Between ".$min." and ".$max."</h1>";echo "<p>".$row_result['Result']."</p>";$min + $increment;$max + $increment;)
  5. The above sounds like a good solution - are there any scraps of code you could provide as an example. I understand how to increment using the ++ operator but I'm not sure what function to use to test for a max. From a novices point of view there seems to be a lot going on to try and put it all together without a little more direction any help appreciated
  6. One that will return all results. I attempted a version of the one below which is from the thread mentioned earlier - I thought it may work even though it is using strings. It worked for the hundreds as I added a zero to the header for the group and grouped it based on assessing the first 2 numbers (strlen). However, when it got to those with 2 rather than 3 numbers it added a zero to the 50 so the heading looked like 500 for example.
  7. I would like to group a list of mysql results in groups of 10 like so via php: >= 260 266265265265264262261260 >= 250 255251etc... Hopefully the same code could be replicated to another list on my site which will contain decimals. >= 2.0 2.92.82.62.62.0 >=1.0 1.91.81.71.0 A solution something like the one here would be fantastic: http://w3schools.invisionzone.com/index.php?showtopic=25967&hl=%26%23036%3bfirst_letter&fromsearch=1
  8. You'll have to excuse my weak php knowledge. My understanding is that the while loop is ok for a list of rows for example. Ford MustangChevy CorvettePontiac Firebird However, I need to echo one of the 3 rows separately and uniquely in various parts of the page. Usually I echo a single result like so with the RAND LIMIT set to 1; Row 1 = Ford Mustang <h1>More <?php echo $row_rs['results'];?>Ford Mustang</h1> However, now I have 3 in the RAND LIMIT I have 3 rows. e.g. Row1 = Ford MustangRow2 = Chevy CorvetteRow3 = Pontiac Firebird Now I need to put a result for whichever row I decide into differing parts of the page. (The <?php echo $row_rs['Row n'];?> part is for example purposes only.) <h1>Car: <?php echo $row_rs['Row1'];?>Ford Mustang</h1> html... <p>Car: <?php echo $row_rs['Row3'];?>Pontiac Firebird</p> more html... <h3>Car: <?php echo $row_rs['Row2'];?>Chevy Corvette</h3> So somehow I think I need to put row 1, 2 and 3 into an array so that I can call them separately and uniquely. I hope that makes sense.
  9. I've currently got a mysql RAND() function to select random rows of data. (Not the most efficient method but it works) My current code returns 1 record but I want to return 3 results so I've changed the LIMIT from 1 to 3 as below. $query_rs = "SELECT * FROM tblexample ORDER BY RAND() LIMIT 3";$rs = mysql_query($query_rs, $database) or die(mysql_error());$row_rs= mysql_fetch_assoc($rs);$totalRows_rs = mysql_num_rows($rs); I need to include the individual rows in various parts of my web page. e.g. Result 1 at the top of the page, Result 2 and 3 elsewhere.How can I alter the code so that I can reference and include the 3 results individually. I assume I can put these in some sort of array.
  10. Once again you're a css genius - The clear: both; tip worked a treat. thankyou, thankyou, thankyou
  11. apologies - just tried the w3c html validator and you're correct there are 67 errors. However, these errors relate to the poor code in the embedded ebay ads which I can do little about. Correct me if I am wrong but these errors have nothing to do with the firefox issue I have.
  12. Which 'validator' are you using? I am using the W3C css validator and I am only getting 3 errors. http://jigsaw.w3.org/css-validator/
  13. I've changed my header from a table to a div layout. This looks fine in IE8 and Google Chrome but in firefox the statistics section of my site doesn't position centrally. Any help appreciated www.autosnout.com
  14. Absolute Genius! I would have been wrestling with this issue for weeks. For the benefit of my own understanding I did a quick search for the overflow: hidden; css property. These seem like a good explanation. http://css-tricks.com/the-css-overflow-property/http://www.w3schools.com/cssref/pr_pos_overflow.asp
  15. Hi CSS experts, I have an issue near the top of a websites homepage where the table/div is not rendering how I expected in Firefox 12.0.As you can see in IE7/8 the table of statistics appears in the centre of the page and below the horizontal menu.Whereas in Firefox the table appears directly after the menu but renders at the right of the page. It works fine in IE7 and IE8. For what it's worth, the CSS validates ok via the W3C validator. I'm not quite sure if it is a CSS or a HTML issue so I didn't want to post a pile of irrelevant code up in the forum. The homepage: http://www.autosnout.com/
×
×
  • Create New...