Evening all...
Here's a question about server response time.
At present I'm using this query:
Code: Select all
$sql = mysql_query("SELECT * FROM pictures WHERE UID='$id'");
coupled with this:
Code: Select all
//WRITE A STRING (ARRAY) THAT FLASH CAN READ
$clever="";
// LOOP THROUGH THE DB AND MAKE A LIST
while (($row = mysql_fetch_assoc($sql)) !== false) {
$imagelist= $row["dirpath"]. ",";
$clever=$clever.$imagelist;
}
//print ("&galpic=" .$clever);
// NOW COUNT THE COMMAS IN THE STRING TO GIVE AN "allpics" VALUE TO FLASH.
$temp_string=$clever;
$num_of_pics= substr_count($temp_string,",");
and then passing all the data to Flash like this (just for anyone who's interested in how to pass php variables to a Flash front end)
Code: Select all
<embed src="memDBgallery.swf" FlashVars="galpic=<? echo "$clever";?> &allpics=<?php echo "$num_of_pics";?>"
So my question is this - at present there are only a few pictures in the db and any one user is not likely
to upload more than say 50 images in the lifetime of their membership. But, over time, the galleries they upload
to (portraits, Landscapes) etc., will become very big indeed. So if I used a query like this:
Code: Select all
$sql = mysql_query("SELECT * FROM pictures WHERE gallery='landscapes'");
and the gallery contained 30,000 images would the server response time or the processing by php be significantly slow ?
(I know it must vary from server to server but assume a basic Linux shared box via an OK hosting service).
Are there any limits I should be aware of when putting this together in terms of a maximum number of elements
in an array or maximum bytes "to and fro" that sql or php can handle ?
Best wishes
Monty