apr1515 Posted December 12, 2010 Share Posted December 12, 2010 How can i get the last row data from a certain column? Quote Link to comment https://forums.phpfreaks.com/topic/221363-row-and-column-data/ Share on other sites More sharing options...
Pikachu2000 Posted December 12, 2010 Share Posted December 12, 2010 Can you clarify what you're trying to do, please? Would this be immediately after an insert, or what? Quote Link to comment https://forums.phpfreaks.com/topic/221363-row-and-column-data/#findComment-1146030 Share on other sites More sharing options...
apr1515 Posted December 12, 2010 Author Share Posted December 12, 2010 i want to post(in text) the data from hmmm... let's say the data from 3x7 on my site. Quote Link to comment https://forums.phpfreaks.com/topic/221363-row-and-column-data/#findComment-1146036 Share on other sites More sharing options...
Pikachu2000 Posted December 12, 2010 Share Posted December 12, 2010 While I'm sure what you said makes perfect sense to you, unfortunately it makes absolutely none to me. Quote Link to comment https://forums.phpfreaks.com/topic/221363-row-and-column-data/#findComment-1146043 Share on other sites More sharing options...
moreira Posted December 12, 2010 Share Posted December 12, 2010 ok, let see if is that that you want: <?php $connection = mysql_connect("host", "username", "password") or die(mysql_error()); //Connection to the database. Error out if the connection fails for @mysql_select_db('yourdatabasename'); //Select the database $query = mysql_query("SELECT * FROM tablename WHERE id = 7"); $row = mysql_fetch_array($query); echo "<h1>" . $row['description'] . "</h1>"; ?> In this example, let supose that your column3 name is "description" and the 3rd row of your table have the id 7 hope i'v been useful. Best regards, Moreira Quote Link to comment https://forums.phpfreaks.com/topic/221363-row-and-column-data/#findComment-1146047 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.