running around 220 insert into mysql and php -


i have 20 files have mysql queries run,

example of file1.php,file2.php,file3.php

<?php $s = array(); foreach($j $y) { //codes $s[] = "($link, $img)"; }  mysql_query("insert xyz values ".implode(',',$s)); ?> 

file1.php,file2.php,file3.php more same , requires insert queries run. //insert varies on each file , dynamic based on input

i have run.php which

<?php require 'file1.php'; require 'file2.php'; require 'file3.php'; ?> 

so execution of file1, file2 , file3 depends on run.php

is safe way it? or should move mysql insert @ run.php (run queries together) instead of leaving in individual files (file1,file2,file3).

what best way send data file1.php run.php? method, echo?

there no problem in doing this. maters initiate transaction before starting queries , commit in end or rollback in case of exception.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

c# - SharpSVN - How to get the previous revision? -

php cli reading files and how to fix it? -