homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

Perl/MySql/php Multiple Insert

Msg#: 4421220 posted 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



Msg#: 4421220 posted 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"


5+ Year Member

Msg#: 4421220 posted 8:59 pm on Feb 26, 2012 (gmt 0)

Please write more clearly next time.

What is the name of mysql table?


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

Msg#: 4421220 posted 1:29 pm on Mar 3, 2012 (gmt 0)

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?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved