Using CSS to format MySQL query


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

If i want to have a news page on my site, which displays all records of a table in descending order by date I am using the below code. I can display it all in a big table but this is a bit boring. Can I use CSS to present these records and still have them repeat like when using a table? Or is it best to just use plain old tables?? How would I add the divs to the below statement? Thanks!

Did you know?Explore Trending and Topic pages for more stories like this.
Here is my code...

<?

include'E:domainssdomain.comuserprivatemysql_connect.php';

mysql_select_db("pix", $con);

$result = mysql_query("SELECT * FROM news_article ORDER BY date DESC");



while($row = mysql_fetch_array($result))
{

echo $row['title'] ;
echo $row['date'] ;
echo $row['content'] ;
echo $row['image_url'] ;
}


mysql_close($con);
?>
No comments posted yet

Your Answer:

Login to answer
334 Like 44 Dislike
Previous forums Next forums
Other forums

Check something, wait, check again, do something!
Hi guys.

I wonder if someone can help me with this.

Basically, what I want to do is (

Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_

MYSQL gen help
This is my Mysql gen. can anyone tell me why this echos

MID(networkset.networkid, 3, 3) AS &q

how can we add data from dynamic fields to mysql db in php
i have a script which i found on the internet. i modify that script according to my needs. what is i

Calander layout
Hi i know this sounds like a simple question but i cant find the answer to it anywhere i have added

filesize problem
i use ubuntu 9.10 and i have mountet a folder from an windows

/mount/FOLDER
/mount/FOLDER/

Need Successful Return
Hello I am currently working a form here, and I have everything figured out except when I click the

Call to undefined function mysql_fetch_accoc()
New to php/mysql coding. What's wrong with this sequence, or am I
just not seeing to obvious?

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understan

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash