Raised This Month: $ Target: $400
 0% 

SQL Selecting a Row?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Drak
Veteran Member
Join Date: Jul 2005
Old 12-27-2008 , 05:25   Re: SQL Selecting a Row?
Reply With Quote #3

Quote:
Originally Posted by danielkza View Post
Best way to do this is to add a PRIMARY KEY column for the table, normally using AUTO_INCREMENT, that should represent each row with an unique number. Then you can read it and do 'DELETE FROM table WHERE id=%d LIMIT 1'.
That's the problem, If have a primary key, I'm not allowed duplicate rows am I? Because the table is set up "<Entity Model> <X><Y><Z>" but I have the same entity model in the table. If I set a key, it throws the "duplicate row" error.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
 



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

Forum Jump


All times are GMT -4. The time now is 09:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode