how to make an install script

Codes here !

Moderators: macek, egami, gesf

Post Reply
ceetee
New php-forum User
New php-forum User
Posts: 8
Joined: Thu Jan 02, 2003 2:28 pm

how to make an install script

Post by ceetee » Sun Jun 22, 2003 6:13 am

I've just finished making a content management system and want a script to install the tables and insert the provisional pass/username. On my first attempt I used the mysql_query () for each create table. This worked fine except err.. the prefix of each table e.g esm_writer_permissions had turned into ESM_writer_permissions. And some tables refused insert commands. I ended up having to paste the SQL into the phpMyAdmin directly.

This isn't a big deal for me but for some users it would. Is there some way of doing it by php instead?

User avatar
mike
New php-forum User
New php-forum User
Posts: 73
Joined: Sun May 04, 2003 4:26 am
Location: Athens
Contact:

Post by mike » Sun Jun 22, 2003 4:00 pm

Have a look on mysql_ functions. You can create tables and insert your pre-configured data inside. Assume that users should first have a database with a valid user/pass.

elToro
New php-forum User
New php-forum User
Posts: 11
Joined: Wed Jun 25, 2003 5:07 am

Post by elToro » Thu Jun 26, 2003 11:32 am

You might try looking at some free/Open Source PHP/MySQL apps that use install scripts. phpBB (http://www.phpbb.com/) comes to mind. Just download it and then look at the code for its install script.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests