Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
Dear Friends,
I execute the following scripts, it took almost 15 minutes and 10MB Memory to display the contents. I would like to solve this problem without using too much memory and long delay. 'SELECT * from employees_salary WHERE emid=1' will return 6015 records. Please help me to solve this problem. How to optimize the following script.
$link=mysql_connect('localhost','root','…
if(!$link){
die("Not connected".mysql_error());
}
$db=mysql_select_db('auto3',$link);
if(!$db) {
die("DB Does not Exits".mysql_error());
}
$sql = 'SELECT * from employees_salary WHERE emid=1';
$result = mysql_query($sql);
while ($row=mysql_fetch_row($result)) {
echo '<pre>';
print_r($row);
echo '</pre>';
}
}
Thanks in advance,
Vijay
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.