Cannibal_Monkey Posted February 28, 2007 Share Posted February 28, 2007 Could somone write a sample code that would retrieve a from row 1 of table b in database c. So far I have <?php $connection=mysql_connect("localhost","root","") or die ("You're dead1"); $db=mysql_select_db("c",$connection) or die ("You're dead2"); $query=mysql_query($a); ?> I'm not sure if that's all correct though, I mean to do what I want to do. Link to comment https://forums.phpfreaks.com/topic/40456-gathering-data/ Share on other sites More sharing options...
gin Posted February 28, 2007 Share Posted February 28, 2007 I suggest this tutorial for database connection: http://www.phpfreaks.com/tutorials/142/0.php The query to get the most recent row of data would be: SELECT * FROM b LIMIT 1 The MySQL & PHP manuals are invaluable resources. Link to comment https://forums.phpfreaks.com/topic/40456-gathering-data/#findComment-195767 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.