Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-28-2014, 06:21 AM
moofta
Sarnak
 
Join Date: Jan 2014
Location: United Kingdom
Posts: 53
Default

with what did you create the new table- by hand or using Navicat/HeidiSQL? (I would suggest doing so if you're not very familiar with SQL in general)

I use HeidiSQL and it's pretty simple to use, surprisingly fast,.. and free!
  1. When you create your table, create the first column in the "Basic" tab and call it "id".
  2. Give it a data type of "INT".
  3. Under the "Default" column, select "AUTO_INCREMENT".
  4. Then click on the "Indexes" tab, click on your id field, then click on "Add". An index called "Index1" will appear.
  5. Click on the "type/length" entry for Index1 (which probably says "PRIMARY"), select "PRIMARY".
  6. Then click "save" at the bottom

Manually you can do this when creating (just copy/pasting a table I created):-

Code:
CREATE TABLE IF NOT EXISTS `zone_drops` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `zone_id` int(11) NOT NULL,
  `zone_name` varchar(50) NOT NULL,
  `item_id` int(11) NOT NULL,
  `item_name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
If you use Navicat or other, there will be a way to set the default value to AUTO_INCREMENT, and also to make it the primary key. That way your ID will always be unique and auto-generated.
Reply With Quote
 

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

Forum Jump

   

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


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3