Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6329989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:46:52+00:00 2026-05-24T17:46:52+00:00

I have an error in my database Error: Invalid structure on line 18. Refer

  • 0

I have an error in my database

Error: Invalid structure on line 18. Refer to our Manual (PHPMYADMIN)

I use (WAMPSERVER 2 32bits)
-PHPMYADMIN
– MYSQL 5.5.6
– PHP 5

Although i need to use InnoDB (ENGINE=InnoDB)

thanks to help me. Take a look at the structure… the variable name meaning is not important.

Here’s my code:

DROP TABLE IF EXISTS Adresse;
DROP TABLE IF EXISTS Telephone;
DROP TABLE IF EXISTS Personne;
DROP TABLE IF EXISTS TelPers;
DROP TABLE IF EXISTS Specialiste;
DROP TABLE IF EXISTS Patient;
DROP TABLE IF EXISTS ListePatient;
DROP TABLE IF EXISTS Produit;
DROP TABLE IF EXISTS Medicament;
DROP TABLE IF EXISTS Materiel;
DROP TABLE IF EXISTS Panier;

CREATE TABLE Adresse(
idAdresse   INT(100) NOT NULL PRIMARY KEY AUTO_INCREMENT,
num         INT(5) NOT NULL,
rue         VARCHAR(30) NOT NULL,
ville           VARCHAR(15) NOT NULL,
postal      VARCHAR(6) NOT NULL
)ENGINE=InnoDB;

CREATE TABLE Telephone(
idTel           INT(100) NOT NULL PRIMARY KEY AUTO_INCREMENT,
typeTel     VARCHAR(15) NOT NULL,
ind         INT(3) NOT NULL,
quartier        INT(3) NOT NULL,
num         INT(4) NOT NULL,
)ENGINE=InnoDB;

CREATE TABLE Personne(
idPersonne      INT(100) PRIMARY KEY NOT NULL AUTO_INCREMENT,
nom             VARCHAR(15) NOT NULL,
prenom          VARCHAR(15) NOT NULL,
idTel               INT(100) NOT NULL,
idAdresse       INT(100) NOT NULL,
FOREIGN KEY(idAdresse) REFERENCES Adresse(idAdresse),
FOREIGN KEY(idTel) REFERENCES Telephone(idTel)
)ENGINE=InnoDB;

CREATE TABLE TelPers(
idPersonne      INT(100) PRIMARY KEY NOT NULL,
idTel               INT(100) PRIMARY KEY NOT NULL,
FOREIGN KEY(idPersonne) REFERENCES Personne(idPersonne),
FOREIGN KEY(idTel) REFERENCES Telephone(idTel)
)ENGINE=InnoDB;

CREATE TABLE Specialiste(
login           VARCHAR(10) PRIMARY KEY NOT NULL PRIMARY KEY,
password    VARCHAR(10) NOT NULL,
profession  VARCHAR(20) NOT NULL,
idListeP        INT(5),
idPanier        INT(5),
idPersonne  INT(100),
FOREIGN KEY(idPersonne) REFERENCES Personne(idPersonne)
)ENGINE=InnoDB;

CREATE TABLE Patient(
idPatient    INT(10) NOT NULL PRIMARY KEY AUTO_INCREMENT,
sexe            CHAR NOT NULL,
anniv           DATE,
assurance   INT(3) NOT NULL,
idPersonne  INT(100),
FOREIGN KEY(idPersonne) REFERENCES Personne(idPersonne)
)ENGINE=InnoDB;

CREATE TABLE ListePatient(
idListeP        INT(5) NOT NULL PRIMARY KEY,
idPatient   INT(10)NOT NULL PRIMARY KEY,
FOREIGN KEY(idListeP) REFERENCES Specialiste(idListeP),
FOREIGN KEY(idPatient) REFERENCES Patient(idPatient)
)ENGINE=InnoDB;

CREATE TABLE Produit(
idProduit       INT(100) NOT NULL PRIMARY KEY AUTO_INCREMENT,
nom         VARCHAR(50) NOT NULL,
descr           VARCHAR(255) NOT NULL,
prix            DECIMAL(5,2) NOT NULL,
qte         INT(100) NOT NULL
)ENGINE=InnoDB;

CREATE TABLE Medicament(
idMedic         INT(100)NOT NULL PRIMARY KEY AUTO_INCREMENT,
marque      VARCHAR(10) NOT NULL,
typeMed     VARCHAR(10) NOT NULL,
idProduit       INT(100) NOT NULL,
FOREIGN KEY(idProduit) REFERENCES Produit(idProduit)
)ENGINE=InnoDB;

CREATE TABLE Materiel(
idMateriel  INT(100) NOT NULL PRIMARY KEY AUTO_INCREMENT,
rabais      INT(99) NOT NULL,                       
idProduit   INT(100) NOT NULL,
FOREIGN KEY(idProduit) REFERENCES Produit(idProduit)
)ENGINE=InnoDB;

CREATE TABLE Panier(
idPanier        INT(5) NOT NULL PRIMARY KEY,
idProduit       INT(100) NOT NULL PRIMARY KEY,
FOREIGN KEY(idPanier) REFERENCES Specialiste(idPanier),
FOREIGN KEY(idProduit) REFERENCES Produit(idProduit)
)ENGINE=InnoDB;

THANKS FOR YOUR HELP! 😀

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:46:53+00:00Added an answer on May 24, 2026 at 5:46 pm
    1. In Telephone declaration there is a comma (,) before closing )

    2. In TelPers there are two primary keys

    3. In Specialiste there is PRIMARY KEY twice in login column

    4. In ListePatien there are two primary keys

    5. In Panier there are two primary keys

    To define a PRIMARY key on two columns use

    CREATE TABLE Panier(
    idPanier        INT(5) NOT NULL,
    idProduit       INT(100) NOT NULL,
    PRIMARY KEY (`idPanier`,`idProduit`),
    FOREIGN KEY(idPanier) REFERENCES Specialiste(idPanier),
    FOREIGN KEY(idProduit) REFERENCES Produit(idProduit)
    )ENGINE=InnoDB;
    

    (same on other tables)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database with a table which is full of conditions and error
I have an error occuring frequently from our community server installation whenever the googlesitemap.ashx
I have this error message: Msg 8134, Level 16, State 1, Line 1 Divide
You have an error in your SQL syntax; check the manual that corresponds to
Notice: You have an error in your SQL syntax; check the manual that corresponds
I have 2 tables in a mysql database : users and pets . In
Errors Database administrators report Microsoft SQL Server 2008 server-side error Invalid Login (error 18456,
I am having great problems solving this one: I have a mysql database encoding
I have to use MS SQL Server 2008 to store data of PHP CAKE
I have an error when i try to connect my database. Error : SQLSTATE[HY093]:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.