View Single Post
Old 02-22-2013, 12:45 AM   PM User | #4
bemore
New Coder

 
Join Date: Feb 2013
Posts: 39
Thanks: 14
Thanked 0 Times in 0 Posts
bemore is an unknown quantity at this point
Code:
$tbl_name="opl_comp";
Currently I only use one table, but plans for more.
What if I had the same table structure for other tables representing different versions of software compatibility... why would this be bad structure?

I use a primary key column called "ID", which is set to A_I in order to call each row individually so users can perform edits and update the list publicly.

Code:
$game_id = isset($_GET['game_id']) ? (int)$_GET['game_id'] : 0;

$rowsID = ($rows['id']); $editlink = "update.php?game_id=$rowsID"; $src = '/files/images/edit.png'; echo '<a href="'. $editlink .'"><img style="border:none;" src="'. $src .'" /></a>';}
My question is, how do I perform an INSERT or something similar that will avoid adding the submission to the database if the user's value for "gamecode" already exists under the column "gamecode".

I have added an index as suggested, but how can I use this to avoid duplicate entries on INSERT?
bemore is offline   Reply With Quote