Andural69 Posted November 28, 2008 Share Posted November 28, 2008 1st -Wasn't positive if this is the right subforum to post a mysql\php combo problem, but since it seems to be on the PHP end, I went with it. using SQLyog Enterprise for windows I've created small procedures, tested, worked fine. I then created a big stored proc in mysql, one that inserts into the main table but also links over to like 7 or so other tables. So this procedure checks for existing, inserts if needed and grabs the ids of several records. Then inserts into the main table. I run this proc from SQLyog over and over, np, works great. Now, I run mysql code and for some wacked out reason, it works on the 4th attempt, every time. click, nothing, click nothing, click nothing, click, it works, and I can only guess at some sort of timeout or connection problem. So, any suggestions on what is causing this or how to go about debugging this? I've checked the variables I'm sending it, that all appears to be fine. I'm also just clicking the back button then my submit button when doing it, so it's the same data on the 4th attempt. If needed, the procedure is around 200 lines long, including the in parameters and everything in there. Most of the calls prior to the big insert are like the following set @refereeid := 0; select @refereeid := Referee_id FROM Referee_t where LName = _RefereeLName and FName = _RefereeFName; if (@refereeid = 0) then insert into Referee_t values(0, _RefereeLName, _RefereeFName); select @refereeid := LAST_INSERT_ID(); end if; I'm going to go to bed soon since I'm running out of ideas. Any help would be appreciated. ty. Quote Link to comment https://forums.phpfreaks.com/topic/134589-php-mysql-procedure-works-after-4-tries/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.