Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Connect to the mysql database
- mysql_connect("host", "username", "password");
- // Select the database
- mysql_select_db("database");
- // Run the mysql query into a variable
- $query = mysql_query("SELECT * FROM blah ORDER BY date DESC");
- // Run a loop on each row from the query. $row is an array of columns of a row
- while($row = mysql_fetch_assoc($query))
- {
- // Print out the array so you can see the shit in it.
- print_r($row);
- // You can also show data by echoing just the column name of the row like so:
- echo $row['column'];
- }
- // lol end love from Fishcake. Love you Nicko <3
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement