Currently i have:
A server that has mySQL installed and accessed by PHP scripts. All data is in SQL database including photos.
What i want to do is move the photos out the database and into their own file structure (that bit i can do) what i don't know is how to get all the string data out the database and photos into one return message, potentially I'm talking a fe hundred rows of data.
Currently i perform sql query and have to do the following
while($row = mysql_fetch_array($result))
{
$encodepic = base64_encode($row['IMAGE']);
$posts[] = array($row['ID'],$row['COL1'], $row['COL2'], $row['COL3'], $row['COL4'], $encodepic, $row['COL5'], $row['COL6'], $row['COL7']);
}
echo json_encode($posts);
If i change the $row['IMAGE'] for the file (obviously read it first, won't that make system really slow?
Is there a better way full stop of doing what I'm trying to do
Also for code tidiness i want to send the dictionary down so other end (unless this makes system inefficient)
Thanks