What's the best way to store something like this? (one time only) in a MYSQL database? It needs to insert all RGB values in a table.
$colors = colourArray(0, 255, $con);
function colourArray($start, $number, $con) {
foreach(range($start,$number) as $r) {
foreach(range($start,$number) as $g) {
foreach(range($start,$number) as $b) {
mysqli_query($con, 'INSERT INTO rgbcolors (r,g,b) VALUES ('.$r.','.$g.','.$b.')');
}
}
}
}
This works, but it takes a very long time to finish with 1 query at a time..
Does someone know a neater way?
You can insert more then one set of values at a time.