Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-12-2006, 10:56 AM
Novice Webmaster
 
Join Date: Aug 2006
Location: Seri Kembangan
Posts: 12
Rep Power: 0
marukochan is on a distinguished road
Why Table Not Exist?

OK ... first I did my program at home. So, I created a database called project_db with a few tables in it. Then I want to bring it to work, so I copied folder project_db which was created in ...\mysql server 5.0\data, then I paste in inside the same folder in my office PC.

When I type show tables, all the tables name appeared but when I want to select * username from users, there is an error 'project_db.users' doesn't exist.

Is it suppose to be like that? How do I bring a database from one place to another place without having this error?

Thanks in advance!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-12-2006, 11:19 AM
Novice Webmaster
 
Join Date: Dec 2006
Location: france
Posts: 47
Rep Power: 0
mdpai is on a distinguished road
Send a message via Yahoo to mdpai
em is not like that we transferring a database from a pc to another pc..what u can do is make a SQL dump file out of it. It's simple, in your database, just klik the tab export, and choose the tables that you want to export, then klik export as file..
on the other pc, create a blank database, then go to SQL tab, then just browse your saved sql file, then klik go,,ahah thats it
__________________
Perlukan Website untuk E-biz?
Belajar membuat web PHP secara percuma di www.mdpai.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-12-2006, 12:08 PM
Novice Webmaster
 
Join Date: Aug 2006
Location: Seri Kembangan
Posts: 12
Rep Power: 0
marukochan is on a distinguished road
Adeh!! Sesuka ati jer I copy paste. Hehehe ....... no wonder ler doesn't exist.

Anyway, I tak braper paham ler mdpai. Tab yg ndak klik utk export tu kat mana eK?!! File database tu ada kat folder c:/Program Files/MySql/MySql Server 5.0/data ... so, I ndak klik kat mana.

Thanxx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-12-2006, 12:18 PM
robot's Avatar
Senior Webmaster
 
Join Date: Jul 2006
Location: My
Posts: 969
Rep Power: 48
robot will become famous soon enough
Quote:
Originally Posted by marukochan View Post
Adeh!! Sesuka ati jer I copy paste. Hehehe ....... no wonder ler doesn't exist.

Anyway, I tak braper paham ler mdpai. Tab yg ndak klik utk export tu kat mana eK?!! File database tu ada kat folder c:/Program Files/MySql/MySql Server 5.0/data ... so, I ndak klik kat mana.

Thanxx
export tab tu ada kat phpmyadmin.
kalau u copy folder database ke pc lain. pastikan fail fail MYD dan FRM tu ada.
lebih baik gunakan export melalui phpmyadmin. copy and paste kadang2 boleh kena file corupt
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-12-2006, 01:15 PM
Novice Webmaster
 
Join Date: Dec 2006
Location: france
Posts: 47
Rep Power: 0
mdpai is on a distinguished road
Send a message via Yahoo to mdpai
Quote:
Originally Posted by marukochan View Post
Adeh!! Sesuka ati jer I copy paste. Hehehe ....... no wonder ler doesn't exist.

Anyway, I tak braper paham ler mdpai. Tab yg ndak klik utk export tu kat mana eK?!! File database tu ada kat folder c:/Program Files/MySql/MySql Server 5.0/data ... so, I ndak klik kat mana.

Thanxx
go to your phpmyadmin, then choose your desired database, then follow above instructions, (click on the export tab, bla bla)...
__________________
Perlukan Website untuk E-biz?
Belajar membuat web PHP secara percuma di www.mdpai.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-12-2006, 05:06 PM
Novice Webmaster
 
Join Date: Aug 2006
Location: Seri Kembangan
Posts: 12
Rep Power: 0
marukochan is on a distinguished road
I haven't install phpMyAdmin in my PC yet. So, how can I do it by using Command Prompt Window?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-12-2006, 05:43 PM
robot's Avatar
Senior Webmaster
 
Join Date: Jul 2006
Location: My
Posts: 969
Rep Power: 48
robot will become famous soon enough
its much easier to manage your database with phpmyadmin, I strongly suggest you install one.
you may need to use mysqldump or mysqlhotcopy to create a backup file of your database
MySQL AB :: MySQL 5.0 Reference Manual :: 8.12 mysqldump — A Database Backup Program

MySQL Open Source Database - mysqlhotcopy, Copying MySQL Databases and Tables
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 07-12-2006, 10:36 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,687
Rep Power: 145
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
kat rumah tu marukochan pakai software apa?
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 08-12-2006, 03:50 AM
Novice Webmaster
 
Join Date: Aug 2006
Location: Seri Kembangan
Posts: 12
Rep Power: 0
marukochan is on a distinguished road
Wah!! It took me three straight hours just to get my phpMyAdmin running on my PC at home. Next I have to install it at the office. Yeah! Now I can see the export/import tab there .........

At home, to create the database and tables, I just use the command prompt window. To write the script I use Dreamweaver trial version which going to end in another 19 days .... which is about the time to submit my Project Paper. I have wasted 3 months doing nothing and now I'm like crazy trying to finish my Project Paper. When you are studying part time and lack of effort, you are going to end up like me ...... doing things last minute. Ha! Ha!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 08-12-2006, 05:33 AM
Novice Webmaster
 
Join Date: Aug 2006
Location: Seri Kembangan
Posts: 12
Rep Power: 0
marukochan is on a distinguished road
Guys!! Can you help me out with my script. I've been in front of the PC since 2:30 am and now it is already 5:30. I'm beginning to see stars already and I think I'm going to

Ok, I have a table called 'code' which has code_id, code_string, status. After the code_string is being generated the table will look like this

code_id code_string status
1 v59cgj0 NULL

What I want to do is after the user has submitted the code, I want to change the status to 'YES' so that when another user use the same code, error message 'Verification Code Has Expired' will appear.

However, I'm not able to change the status. Is my query wrong?

Here is my script

...
...
if (!get_magic_quotes_gpc()) {
$_POST['code'] = addslashes($_POST['code']);
}
$check = mysql_query("SELECT * FROM code WHERE code_string = '".$_POST['code']."'")or die(mysql_error());

//Error if code does not exist
$check2 = mysql_num_rows($check);
if ($check2 == 0) {
die('INVALID VERIFICATION CODE. <a href=verification.php>TRY AGAIN</a>');
}
while($info = mysql_fetch_array( $check ))
{
$_POST['code'] = stripslashes($_POST['code']);

//gives error if the password is wrong
if ($info['status'] != "") {
die('VERIFICATION CODE EXPIRED');
}
else
{
$insert = "INSERT INTO code (status) VALUES ('YES') WHERE code_string = '".$_POST['code']."'";
$add_insert = mysql_query($insert);

//then redirect them to the registration page
header("Location: registration.php");
}

......
........

Last edited by marukochan; 08-12-2006 at 05:35 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 08-12-2006, 01:24 PM
Novice Webmaster
 
Join Date: Dec 2006
Location: france
Posts: 47
Rep Power: 0
mdpai is on a distinguished road
Send a message via Yahoo to mdpai
what kind of error did you get?
__________________
Perlukan Website untuk E-biz?
Belajar membuat web PHP secara percuma di www.mdpai.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 09-12-2006, 05:03 PM
Novice Webmaster
 
Join Date: Aug 2006
Location: Seri Kembangan
Posts: 12
Rep Power: 0
marukochan is on a distinguished road
OK guys!! I manage to get all my script running. Fuh!! At least 1/3 of the script is running already. Now need to stop for a while to do some literature review to be written in my thesis.

I'll be coming to this forum again somewhere next week should I face any problem with my script (another 2/3).

Thanks everybody for replying my posts!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
<table> are they bad? robot Website Design 12 03-01-2007 12:32 PM
Mod: Table and cup Tahar Graphic Design 1 06-10-2006 08:40 PM
select 2 table meiji Website Programming 5 02-02-2005 10:32 AM
Convert TABLE to CSS lcf Websites Review and Suggestion 3 07-11-2004 01:59 AM
Table? Css? lcf Website Design 10 22-03-2004 09:40 AM


All times are GMT +8. The time now is 01:00 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61