php/mysql question, retrieving information
Posted
by
chance
on Stack Overflow
See other posts from Stack Overflow
or by chance
Published on 2011-01-05T19:50:11Z
Indexed on
2011/01/05
19:53 UTC
Read the original article
Hit count: 132
Hey SO,
I have a question, pretty new at PHP and MySql
but was curious is it possible to display only the most recent column to a table, from a database?
I know it is possible to display a list of all information, or if you have just one column of information in your table to display that using the
Here is my code for my basic script (just loads 1 column of information) I would like it to only print out the recent column i added to the table
$con = mysql_connect ("localhost","username","password"); if (!$con) { die ('Could not connect:' . mysql_error()0; } mysql_select_db("db_name", $con); $result = mysql_query(Select column FROM table"); while($row = mysql_fetch_array($result)) { echo $row['column']; }
mysql_close($con);
* keep in mind, im not looking for someone to shoot me my code with it completed, though it would be handy, however just giving me the options of what I have to do, or what the script is called would be plentiful enough for my research, thanks!
© Stack Overflow or respective owner