mysql - PHP Include multiple files are trying to merge SQL Queries -


i have webpage automatically refreshes every 20 seconds check new emails , few other bits.

the 1 file automate.php has <?php include ... ?> 6 files.

in 6 of files included run sql queries if 2 run @ 1 through automate.php file try go together.

for example, if include1.php , include2.php both run query @ same time

include1.php: ($sql="query here";)  include2.php: ($sql="query here";) 

they both $sql dont know differece.

whats best way stop happening?

it's not problem run simultaneously (which i'm not sure in case).

if have website has form inputs information database each time it's filled out, if 2 people fill out form @ same time break website?

edit: if i've misunderstood , meant query 2 using query stored in first $sql , doesn't because you've redefined second query, , re defined again query 3 / 4 / 5 etc. ie:

//query 1 $sql = 'select * `test`';  //rest of query   //query 2     $sql = 'select count(*) `test2`; 

//$sql no longer = 'select * test' you've redefined 'select count(*) test2;


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -