I'm pretty new to PHP and MySQL. I was wondering what the most efficient way to access a large database would be. All the tutorials I've seen show something along the lines of:
$database = mysql_query("SELECT * FROM table"); But it seems to me that if 'table' was a large database then the time that it would take to copy 'table' into $database would grow fast. Wouldn't it be faster to only load a few rows if we knew their primary key?
And how do you look up a row by its primary key? What I found on Google didn't have much information with it explaining what was going on. Thanks!