Welcome to WebmasterWorld Guest from 54.167.5.15

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Perl/MySql/php Multiple Insert

     

dartsuresh

5:13 am on Feb 24, 2012 (gmt 0)



we have domain search script in perl this script call from php using exec() command .when call the perl script from php with some domain name and userid then perl script crawl the domain detail and insert into mysql table .table names are [domain,host] so its working .problem is when 2 user search same time perl script insert insert some data of 1 user to 2 user detail viceversa

dartsuresh

6:58 am on Feb 24, 2012 (gmt 0)



am explain more

for example we have 2 database first one have detail of all domain name and subdomian name owner and so this is referenced database another one is used to save the search result of user. we have a php page when user enter the some domain name domain1.com and click search then php page call perl script with system(""perl /opt/disco/crawlr.pl -v -d $domain $userid > /dev/null &"");. perl script search the data about this domian1.com name from database1 then insert into detail to database2 with search key and userid and domain name subdomain name and so.this script working well when only one user search at a time.when 2 user search 1 user using domain1.com and 2 user using domain2.com then perl script search the detail from database1 and insert into database 2 but problem is result is mixed between 2 user i mean we have a coloumn name domain,userid actual result is domain |userid domain1.com |1 sub1.domain1.com|1 sub2.domain1.com|2 domain2 |2 sub1.domain2.com|2 sub2.domain2.com|2 but my result domain |userid domain1.com |1 sub1.domain1.com|2 sub2.domain1.com|1 domain2 |2 sub1.domain2.com|1 sub2.domain2.com|2 i thing this is clear"

chorny

8:59 pm on Feb 26, 2012 (gmt 0)

5+ Year Member



Please write more clearly next time.

What is the name of mysql table?

phranque

1:29 pm on Mar 3, 2012 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, dartsuresh!

from your description it is impossible to tell if this is a perl problem or a database concurrency problem.

what type of database do you have?
are you using mod_perl on your server?
what methods have you tried while debugging the problem?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month