Grrrr...
Moderator: General Moderators
-
bobthebobert
- Forum Commoner
- Posts: 25
- Joined: Sat Feb 15, 2003 5:56 pm
Grrrr...
Well, I have been doing well lately, but now I have another problem I can't figure out -.-
My MySql/Php table doesn't save when I turn off my computer...
It will be working fine, then I turn my computer off, and when its back on, it doesnt work anymore...
My MySql/Php table doesn't save when I turn off my computer...
It will be working fine, then I turn my computer off, and when its back on, it doesnt work anymore...
-
bobthebobert
- Forum Commoner
- Posts: 25
- Joined: Sat Feb 15, 2003 5:56 pm
-
bobthebobert
- Forum Commoner
- Posts: 25
- Joined: Sat Feb 15, 2003 5:56 pm
you shouldn't have to close your connection. You can make some queries on the database that don't actually put anything into the database... to put things into the database you should be using (or something similar):
$sql = "INSERT into database_name (name,email,pass) VALUES ('$name','$email','$pass)" or die ('DB Error');
$result = mysql_query($sql);
If you're not doing something that actually PUTS the data into the database then of course it wouldn't still be there when you turn the computer back on the next day.
Jade
$sql = "INSERT into database_name (name,email,pass) VALUES ('$name','$email','$pass)" or die ('DB Error');
$result = mysql_query($sql);
If you're not doing something that actually PUTS the data into the database then of course it wouldn't still be there when you turn the computer back on the next day.
Jade
-
bobthebobert
- Forum Commoner
- Posts: 25
- Joined: Sat Feb 15, 2003 5:56 pm
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
That's because you need MySQL running in order to use the data stored in it's databases. PHP doesn't do the work of querying the database, MySQL does so you need MySQL running when you want to interact with your databases.bobthebobert wrote:But as soon as I turn off MySql.exe, I can't access them anymore..
Mac
-
bobthebobert
- Forum Commoner
- Posts: 25
- Joined: Sat Feb 15, 2003 5:56 pm
What I highly suggest: Save all data (htdocs/ and mysql data); install PHPTriad; use that setup for apache, php, and mysql (along with phpMyAdmin). Works great for me. 
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
That clarifies it a bit more.bobthebobert wrote:Grrr, I know that. What I meant was as soon as i turned off Mysql, and turned it back on, the data from before that I would use would be gone.
What exactly do you mean by 'it doesnt work anymore' and 'I can't access them anymore'? Do you get error messages, does a script that works before not work after?
Have you tried accessing the database through a database admin tool like phpMyAdmin to see what's in the database? If you haven't it would probably be a good idea.
This is a strange problem, the more information you give us about what you're doing, what error messages or strange script behaviour you're getting the more likely we will be able to help you.
Mac
-
bobthebobert
- Forum Commoner
- Posts: 25
- Joined: Sat Feb 15, 2003 5:56 pm
-
bobthebobert
- Forum Commoner
- Posts: 25
- Joined: Sat Feb 15, 2003 5:56 pm
