Jump to content
  • 0

Problema baza de date.


LysenkoAdv

Question

Salut, am o problema la o baza de date, cand o urc pe localhost functioneaza perfect nu primesc nici o eroare dar cand o urc pe un server hostat primesc aceasta eroare (https://imgur.com/a/6QHXwZI) am cautat pe diferite site-uri si am intrebat cateva persoane dar nu ma ajutat nimeni..

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
La 23.01.2019 la 6:55, Banditul a spus:

Poti arata acel CREATE TABLE rpg_tickets din fisierul .sql?

E posibil ca pe localhost sa ai MariaDB si hostu sa foloseasca MySQL(sau vice versa) si sa fie o vloare pusa gresita la default


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

--
-- Structură tabel pentru tabel `rpg_tickets`
--

CREATE TABLE `rpg_tickets` (
  `id` int(11) NOT NULL,
  `Author` text NOT NULL,
  `Player` text NOT NULL,
  `Details` text NOT NULL,
  `Date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Status` int(11) NOT NULL,
  `IP` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Link to comment
Share on other sites

  • 0

Incearca asa

CREATE TABLE `rpg_tickets` (
  `id` int(11) NOT NULL,
  `Author` text NOT NULL,
  `Player` text NOT NULL,
  `Details` text NOT NULL,
  `Date` datetime NOT NULL DEFAULT '1970-01-01 00:00:01' ON UPDATE CURRENT_TIMESTAMP,
  `Status` int(11) NOT NULL,
  `IP` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

E posibil ca hostul sa foloseasca o versiune de mysql mai mica de 5.6 care nu accepta in DATETIME sa fie default CURRENT_TIMESTAMP

De asemenea ai putea face asa si e acelasi lucru

CREATE TABLE `rpg_tickets` (
  `id` int(11) NOT NULL,
  `Author` text NOT NULL,
  `Player` text NOT NULL,
  `Details` text NOT NULL,
  `Date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Status` int(11) NOT NULL,
  `IP` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

Link to comment
Share on other sites

  • 0
La 23.01.2019 la 7:15, Banditul a spus:

Incearca asa

CREATE TABLE `rpg_tickets` (
  `id` int(11) NOT NULL,
  `Author` text NOT NULL,
  `Player` text NOT NULL,
  `Details` text NOT NULL,
  `Date` datetime NOT NULL DEFAULT '1970-01-01 00:00:01' ON UPDATE CURRENT_TIMESTAMP,
  `Status` int(11) NOT NULL,
  `IP` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

E posibil ca hostul sa foloseasca o versiune de mysql mai mica de 5.6 care nu accepta in DATETIME sa fie default CURRENT_TIMESTAMP

De asemenea ai putea face asa si e acelasi lucru

CREATE TABLE `rpg_tickets` (
  `id` int(11) NOT NULL,
  `Author` text NOT NULL,
  `Player` text NOT NULL,
  `Details` text NOT NULL,
  `Date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Status` int(11) NOT NULL,
  `IP` varchar(32) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

 

A fost a2a, multumesc mult pentru ajutor... incerc sa rezolv asta de 3 zile, ma bucur ca mai sunt si persoane ca si tine.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.