Jump to content

Recommended Posts

Hi

Is it possible to load a complete database dump into mySql like phpMyAdmin can (through the ”sql query field”)

 

This is a small part of what I would like to load into my database through my own php code (my users can't have access to phpMyAdmin) :

 

drop table if exists bruger;

create table bruger

(

    brugerId int auto_increment primary key,

    navn char(100),

    email char(200),

    kode char(30),

    adm char(1),

    loginCount int

);

 

insert into bruger (brugerId, navn, email, kode, adm, loginCount) values (1, "Bruger_1", "mail@Bruger_1.dk", "XXXXXXX", "", 48);

insert into bruger (brugerId, navn, email, kode, adm, loginCount) values (2, "Bruger_2", "mail@Bruger_2.dk", "XXXXXXX", "1", 30);

I have tried 

$backup = include("../backup/".$dbFil);

$result = mysql_query($backup);

without any luck.

 

Thanks in advance !

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.