Search found 10 matches

by Suraski
Fri Jul 13, 2007 6:07 pm
Forum: PHP - Code
Topic: MYSQL List Problem
Replies: 5
Views: 1054

no, that didn't work either
by Suraski
Fri Jul 13, 2007 1:59 pm
Forum: PHP - Code
Topic: MYSQL List Problem
Replies: 5
Views: 1054

I have other entries in the 'cat' column in the table, I want to display just the one's with Blog in the column.

http://www.bensphotosite.com/home/index.php
that's my website, the green table on the right side-bar is where this code starts, you can see that it isn't displaying the data
by Suraski
Fri Jul 13, 2007 12:56 pm
Forum: PHP - Code
Topic: MYSQL List Problem
Replies: 5
Views: 1054

MYSQL List Problem

The script below doesn't list the text from from the database correctly, unless I remove the 'if' statement mysql_select_db("news", $blog); $result = mysql_query("SELECT * FROM news LIMIT 5"); while($row['cat'] = mysql_fetch_array($result)) { if($row['cat'] == 'Blog') { echo &quo...
by Suraski
Fri Jul 13, 2007 10:02 am
Forum: PHP - Code
Topic: PHP substr function problems
Replies: 2
Views: 452

Ok, thanks that was the trick, I guess I'm still a noob when it comes to PHP
by Suraski
Fri Jul 13, 2007 9:56 am
Forum: PHP - Code
Topic: PHP substr function problems
Replies: 2
Views: 452

PHP substr function problems

I'm having trouble getting substr(); to display the data from a mysql database. here's my code: $news2 = $row['news']; include('includes/head.php'); $date = date('Y-m-d H:i:s'); mysql_select_db("news", $con); $result = mysql_query("SELECT * FROM news ORDER BY date DESC LIMIT 10")...
by Suraski
Thu Jul 12, 2007 10:13 am
Forum: PHP - Code
Topic: MYSQL Display
Replies: 5
Views: 413

Thx everybody
by Suraski
Wed Jul 11, 2007 8:17 pm
Forum: PHP - Code
Topic: PHP table order from MYSQL
Replies: 3
Views: 519

ok, that's still not working, I don't know if it's my code or not.
by Suraski
Wed Jul 11, 2007 12:37 pm
Forum: PHP - Code
Topic: MYSQL Display
Replies: 5
Views: 413

ok, here's my current code. I want to display only ten rows from the table, can you help me out? mysql_select_db("news", $con); $result = mysql_query("SELECT * FROM news"); while($row = mysql_fetch_array($result)) { if ( $row['cat'] == News){ echo " <table bgcolor=\"#FF...
by Suraski
Wed Jul 11, 2007 12:21 pm
Forum: PHP - Code
Topic: MYSQL Display
Replies: 5
Views: 413

MYSQL Display

I want to only display only 10 MYSQL rows instead of all of the rows in the table, what's the code?
by Suraski
Tue Jul 10, 2007 10:37 pm
Forum: PHP - Code
Topic: PHP table order from MYSQL
Replies: 3
Views: 519

PHP table order from MYSQL

I want to view the tables in descending order, how do I do that here? http://www.bensphotosite.com/home/index.php Here's my code mysql_select_db("news", $con); $result = mysql_query("SELECT * FROM news"); while($row = mysql_fetch_array($result)) //if($row['cat'] = News) { if ( $r...