I erased my HD and re-installed wampserver.
but before that, i saved all work (ofcourse).
how ever, i might have saved my database wrong somehow...
i just saved it all into a .sql file. (exported).
and now when i try to import the .sql file. i get errors.
The sql file have both my game tables, and forum tables.
if thats the thing that mess up, is there a way to split them ?
or do i have to re-write all tables again ?
starting to re-write em all as i wait for answear....
messy mysql
Re: messy mysql
WAMP wouldn't spit an error at you if their wasn't an error in your database in the first place.
The common things that could be wrong are:
***I'd recommend getting notepad++ it's an awesome free tool that can really help with coding***
Open your sql file in notepad++ and look for any errors you may have in their.
Another thing you could try would be to import each table one by one.
You may not be connected to the server.
you may not be creating tables the correct way in your code.
I'm not saying any of these are the problems or the solutions to your situation but, they are the most common problems I've run into when I've been importing sql into a WAMP server and usually how I fix them.
This is how to connect to your database:
save that as connect.php
And if you wanted to test the connection to the database all you'd have to do is add this to the top of your code:
and if you wanted to learn more about how the connection between php and mysql I'd recommend reading Kevin Yank's tutorial on it which can be found here:
http://articles.sitepoint.com/article/p ... tutorial/2
It helps out a lot if you have a better understanding of the connection between the two even if you're a skilled coder.
The common things that could be wrong are:
***I'd recommend getting notepad++ it's an awesome free tool that can really help with coding***
Open your sql file in notepad++ and look for any errors you may have in their.
Another thing you could try would be to import each table one by one.
You may not be connected to the server.
you may not be creating tables the correct way in your code.
I'm not saying any of these are the problems or the solutions to your situation but, they are the most common problems I've run into when I've been importing sql into a WAMP server and usually how I fix them.
This is how to connect to your database:
Code: Select all
<?php
$db = mysql_connect("localhost","root","") or die("Database could not be found");
if(!$db)
die("no db");
if(!mysql_select_db("tutorial",$db))
die("No Database Selected");
?>
And if you wanted to test the connection to the database all you'd have to do is add this to the top of your code:
Code: Select all
include 'connect.php';
http://articles.sitepoint.com/article/p ... tutorial/2
It helps out a lot if you have a better understanding of the connection between the two even if you're a skilled coder.
Advanced:Html(XHTML), CSS, Writing
Intermediate: php, MYSQL, Level Design, C++, JavaScript
Beginner:Java, C-Lite, 3D modeling
The difference between me and you:
You: Me:
Intermediate: php, MYSQL, Level Design, C++, JavaScript
Beginner:Java, C-Lite, 3D modeling
The difference between me and you:
You: Me:
Re: messy mysql
Yey. i managed to import the database.
i splited the forum stuff from the game database stuff into different dokuments.
but now the game is messed up.
some things are not where they are supposed to be, alot of stuff are skewed
fix one thing, and another problem pops up hahaha
i splited the forum stuff from the game database stuff into different dokuments.
but now the game is messed up.
some things are not where they are supposed to be, alot of stuff are skewed
fix one thing, and another problem pops up hahaha
-
- Posts: 180
- Joined: Fri Apr 02, 2010 1:05 pm
Re: messy mysql
That happens A LOT while coding(at least it happened,maaaany times to me)tomtefan wrote: fix one thing, and another problem pops up hahaha
Re: messy mysql
hehe ye, seems so.
but i still find it weird that it worked so much different before i erased the hd...
back then the pages just loaded up smoothly.
now they blink up. annoying as hell.
must be this windows version thats messed up abit.
cuz firefox also get alot of errors and needs to be emediatley closed and shit.
tho, this isnt the first time when iam close to finish line and things mess up.
but this time iam gonna finish it. even it if feckes me up 50 times.
computers are made to piss ppl off <-- what i always think
but i still find it weird that it worked so much different before i erased the hd...
back then the pages just loaded up smoothly.
now they blink up. annoying as hell.
must be this windows version thats messed up abit.
cuz firefox also get alot of errors and needs to be emediatley closed and shit.
tho, this isnt the first time when iam close to finish line and things mess up.
but this time iam gonna finish it. even it if feckes me up 50 times.
computers are made to piss ppl off <-- what i always think
Re: messy mysql
found the skewing error.
i was viewing it in explorer instead of firefox... doh!!
i was viewing it in explorer instead of firefox... doh!!