Simple SQL table deployment?
Posted by: jonathon (---.hsd1.nj.comcast.net)
Date: September 26, 2007 04:47PM

Hi all,

I'm developing an application on linux but delivering it on wampserver/windows. It's simple for me to create SQL tables using the shell, but I want a simple solution for deployment where the customer doesn't have to type any commands.

Is it better to create a php script that creates the database and tables, or do I need a separate DOS batch file to do it, or does the customer have to use phpmyadmin?

Options: ReplyQuote
Re: Simple SQL table deployment?
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: September 26, 2007 09:16PM

you can create/generate sql code using php:

$user = 'root';
$pass = 'password';
$host = 'localhost';

$dblink = mysql_connect($user, $pass, $hostr);

$sql = '
CREATE TABLE customer
(First_Name char(50),
Last_Name char(50),
Address char(50),
City char(50),
Country char(25),
Birth_Date date)
';

mysql_query ($dblink, $sql);

or you can use phpmyadmin to setup databases.


CyberSpatium
----------------------
WAMP English Forum Admin

I have WAMP5 working with (for development use only):
Windows Vista Ultimate x64 (64 bit)
Kaspersky Internet Security Suite 7.0.x
Spyware Terminater 2.x
CounterSpy 2.5.x


Need help? Check out my WAMP User Manual/Guide here!


Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.


Clarify Loans
Mortgage and Home Loan Advice


LaxGo Web Directory
Powerful human edited web directory of quality, spam-free sites organized via a comprehensive category structure.

Options: ReplyQuote


Sorry, only registered users may post in this forum.