Forum Moderators: coopster

Message Too Old, No Replies

SQL Query stuff (newbie)

Can I access a SQL database offline?

         

GarySWW

5:06 pm on May 30, 2005 (gmt 0)



Hi all.

I'm new to the site and to be honest I'm still a little bewildered being new to php but I'm trying to understand it all. I started with php because I run a couple of forums that use php and I'd like to adapt them and also try to write a few scripts.

I'm practicing writing a few simple scripts and that is going fine. What I do have problems with is the practicalities of php and SQL. I've not written any scripts that use MySQL databases nor know how I can access those databases. Sorry for the big preamble but here are my questions:

1. Can I access Backups of my SQL databases offline and practice with them and if so, how?

2. I use phpBB forums and would like to append the database details of users to contain phone numbers (should they wish to add them). Can this be done without screwing up the forum?

Thanks in advance people :)

Regards,
Gary

Terkin

9:35 pm on May 30, 2005 (gmt 0)

10+ Year Member



1.
<?php
// Connecting, selecting database
mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
mysql_select_db('my_database')
?>

Description function [php.net]

2. ALTER TABLE NAME_TABLE ADD NAME_FILD VARCHAR(20) NOT NULL;

coopster

9:58 pm on May 30, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, GarySWW.

MySQL has a couple of options for backups, one of which is their mysqldump [dev.mysql.com] utility.