On Thu, Jun 23, 2011 at 16:08, Chris Stinemetz <chrisstinemetz@xxxxxxxxx> wrote: > > I must be missing something. I am just getting a blank page. Your help > is greatly apprecieated. This is why you're supposed to take the advice and write it out yourself, not copy and paste the code. ;-P By copying and pasting the stuff, you broke your query. Karl suggested you use a column which doesn't exist. Instead, change the query back to what it was before, add the function (you should be able to copy and paste that part though) at the end of the file, and then use the line of code I gave you. Obviously, I can't write it out for you, but you'll get the idea. > The function and query statement is: > > function getSpeed($val) { > if($val != 'undefined') { > switch ($val){ > case "1": > $post_tptest = "0-250kbps"; > break; > case "2": > $post_tptest = "250-300kbps"; > break; > case "3": > $post_tptest = "300-400kbps"; > break; > case "4": > $post_tptest = "400-600kbps"; > break; > case "5": > $post_tptest = "600kbps-3.8mbps"; > break; > default: > $post_tptest = "Speed Undetected"; // or "0-250kbps" > break; > } > } else { > return("Error, no speed value set"); > } > } > } > > $post_speed = getSpeed($post_tptest); > > //fetch the posts from the database > $posts_sql = "SELECT > posts.post_store, > posts.post_content, > posts.post_speed, > posts.post_date, > posts.post_by, > users.user_id, > users.user_name, > users.first_name, > users.last_name > FROM > posts > LEFT JOIN > users > ON > posts.post_by = users.user_id > WHERE > posts.post_store = " . mysql_real_escape_string($_GET['id']) . " > ORDER BY > posts.post_date DESC "; > > > The call: > > while($posts_row = mysql_fetch_assoc($posts_result)) > { > echo '<tr class="topic-post"> > <td class="user-post">' . $posts_row['first_name'] . ' ' . > $posts_row['last_name'] . '<br/>' . date('m-d-Y h:iA', > strtotime($posts_row['post_date'])) . '</td> > <td class="post-content">' . > getSpeed($posts_row['post_tptest']) . '<br/>' . > htmlentities(stripslashes($posts_row['post_content'])) . '</td> > </tr>'; > } > } > > > Thank you! > -- </Daniel P. Brown> Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/