Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 01-14-2007, 09:29 PM   #1 (permalink)
v7n Mentor
 
Sketch's Avatar
 
Join Date: 05-06-04
Location: London, UK
Posts: 664
iTrader: 0 / 0%
Latest Blog:
None

Sketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web proSketch is a highly respected web pro
mySQL Issue

I've got a small issue with a mysql query.

I have a simply insert query

Code:
$eventId = $sql -> read($db, "SELECT eventId FROM division WHERE divisionId = '1'"); $reader = $sql -> bQuery("SELECT COUNT(userId) FROM team_player WHERE userId = '5' AND eventId = '".$eventId[0]['eventId']."' AND divisionId = '1'"); if($reader[0]['COUNT(userId)'] == 0) { $sql -> write("INSERT INTO team_player (userId, divisionId, eventId) VALUES ('5', '1', '".$eventId[0]['eventId']."')");
I read the database to make sure the user isn't already inserted into that table, if they aren't in there then insert them.

However for some reason every now and again I'm getting two of the same user appearing in the table, it is as if mySQL has decided to throw the same query 2 times, can this happen? If it can how do I stop it?
Sketch is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
www and non www issue webexplore Google Forum 9 09-15-2007 05:59 PM
WOMD - Issue or Non-issue John Scott Controversial Social Issues 1 08-02-2007 09:30 AM
Help with a possible CSS issue Mr.Bill Coding Forum 5 07-24-2007 05:35 PM
CSS Issue Sketch Coding Forum 7 02-16-2007 06:13 PM
css issue in IE6 sachi Coding Forum 8 02-05-2007 12:57 PM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 09:51 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.