Error 1050 entering data in Xampp

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Error 1050 entering data in Xampp

Postby Sbbshs » 05. June 2022 12:12

What should I do when I want to enter database data into Zamp?
Error
SQL query: Copy


--
-- Database: city
--

-- --------------------------------------------------------

--
-- Table structure for table accounts
--

CREATE TABLE accounts (
id int(11) NOT NULL,
username text DEFAULT NULL,
password varchar(32) NOT NULL,
salt varchar(30) NOT NULL DEFAULT '1234567890',
email varchar(100) NOT NULL,
registerdate text DEFAULT NULL,
lastlogin datetime DEFAULT NULL,
ip text DEFAULT NULL,
admin float NOT NULL DEFAULT 0,
supporter float NOT NULL DEFAULT 0,
vct float NOT NULL DEFAULT 0,
mapper float NOT NULL DEFAULT 0,
scripter float NOT NULL DEFAULT 0,
warn_style int(1) NOT NULL DEFAULT 1,
hiddenadmin tinyint(3) UNSIGNED DEFAULT 0,
adminjail tinyint(3) UNSIGNED DEFAULT 0,
adminjail_time int(11) DEFAULT NULL,
adminjail_by text DEFAULT NULL,
adminjail_reason text DEFAULT NULL,
muted tinyint(3) UNSIGNED DEFAULT 0,
globalooc tinyint(3) UNSIGNED DEFAULT 1,
friendsmessage varchar(255) NOT NULL[...]
MySQL said: Documentation

#1050 - Table '`city`.`accounts`' already exists
:oops:
Sbbshs
 
Posts: 2
Joined: 05. June 2022 11:57
XAMPP version: Up Version
Operating System: Windows 10

Re: Error 1050 entering data in Xampp

Postby Altrea » 05. June 2022 12:38

if you want to add data to a database table, a CREATE TABLE statement is the wrong one
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Error 1050 entering data in Xampp

Postby Sbbshs » 05. June 2022 16:07

Sorry I did not understand your answer, I mean I have to give a ticket somewhere else Or did you answer here? Can you say more clearly?
Sbbshs
 
Posts: 2
Joined: 05. June 2022 11:57
XAMPP version: Up Version
Operating System: Windows 10

Re: Error 1050 entering data in Xampp

Postby Altrea » 05. June 2022 17:25

A create table statement is for creating a database table, the structure to tell the database management system what type of data you want to store.
A database table needs to have a unique name. you tried to create the database table a second time with the same name.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Error 1050 entering data in Xampp

Postby Nobbie » 05. June 2022 22:25

You try to create a table which already exists. Thats all.
Nobbie
 
Posts: 13179
Joined: 09. March 2008 13:04

Re: Error 1050 entering data in Xampp

Postby Froosh » 05. June 2022 23:47

I think you want to use an insert statement to add data to an existing table. You may want to read up on MySQL and the different database operations. In my thinking, if you are not up on manipulating a database directly, it is probably not the best approach to adding (or updating) data.
User avatar
Froosh
 
Posts: 138
Joined: 27. March 2022 17:56
XAMPP version: 8.2.0
Operating System: Windows 11 Pro


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 186 guests