Mlam main page

SourceForge Logo

Little note from the redactor, my natural language is french, so i apologize for the probable incoherences in this text
Want to see mlam working ? - project initialisation


Presentation of the project - mysql creation
The project is to handle a dvd database. In this project, each dvd represents a movie (something we can find on Therefore, we will be able to have more than one dvd for the same movie (we are talking to a true dvd fanatic here).
We are going to create a new database for this project : mlam_in_work
We have to create a table named users if we want to use mlam. The sql creation query is :
user_id bigint(20) NOT NULL auto_increment,
nom varchar(50) NOT NULL default '',
pass varchar(100) NOT NULL,
acces tinyint(4) NOT NULL default '0',
PRIMARY KEY (user_id)
We need to insert a user in this table, mlam will ask for it someday ;)
INSERT INTO users VALUES ( '1', 'admin', 'yep', '0');
The movies informations will be in a table named film (it's movie in french). Here we go with the sql creation query :
film_id bigint(20) unsigned NOT NULL auto_increment,
title varchar(50) NOT NULL default '',
year year(4) default NULL,
imdb_id bigint(20) unsigned default NULL,
commentaire text,
img_film varchar(200) default NULL,
PRIMARY KEY (film_id)
Some comments :
imdb_id is the last number in url like
commentaire means comment in french, it will be used to allow insertion of comments about the movies.
img_film will represent a picture. In fact we'll store here the name of the file.
Now for the dvd, we create the table with this :
dvd_id bigint(20) unsigned NOT NULL auto_increment,
dvd_film_id bigint(20) unsigned default NULL,
comment char(50) default NULL,
PRIMARY KEY (dvd_id)
Some comments :
this table is very simple, we only keep a reference to the movie and little space for little comments. Moreover, we don't see here any zone informations (just for remind, the dvd are zone specific, ranging from 1 to 6). In fact, we won't forget the zone code information, but we will handle the dvd having one more code (this is a possibility). A dvd may be coded for zone 2 and 4 for instance, so we will use two more tables for stocking the zone data and linking dvd to zones :
zone_id bigint(20) unsigned NOT NULL auto_increment,
zone char(20) NOT NULL default '',
PRIMARY KEY (zone_id)

CREATE TABLE dvd_zone (
link_id bigint(20) unsigned NOT NULL auto_increment,
dvd_link_id bigint(20) unsigned NOT NULL default '0',
zone_link_id bigint(20) unsigned NOT NULL default '0',
PRIMARY KEY (link_id)
Some comments :
the zone table is very easy, it just contains the name of the zone. The dvd_zone is meant to be used this way. If a dvd (id 1) has two zones (ids 2 and 4), we will have 2 records in dvd_zone table :
- one with dvd_link_id=1 and zone_link_id=2
- one with dvd_link_id=1 and zone_link_id=4
We are done with the sql creations, we are now able to initialise mlam for this project.

Mlam project initialisation
I suppose here that mlam has been installed as described in the documentation (here for instance). So here we go with a step by step :
Open http://yoursite/mlam_install/mlam_init.php, you'll have something like this :
Choose your language :

Choose an installed mlam site

Indicate a new directory to begin an installation

We are beginning a new installation, so you have to enter a new directory name (which must be present on your server). Important note : your server must have writing rights in this directory. Don't forget that a http access to this directory must be allowed, because you'll soon use it with you navigator. The trailing / is also important. In my case, I use /install/dvpt/tutorial/, then validation, and here we go to the next screen :
Where remains mlam ?
I need to know how to connect to your database
What's the host name ?
What's the login name ?
What's the password ?
What's the base name ?
Mlam tries to guess where it remains on the server, but this process isn't very good for the moment, so the some values may be wrong. Put here the good value (the directory in which you installed mlam library), without forgetting the trailing /. Then you must give mlam the correct values for database connections. After validating, mlam verifies that it can connect itself to the database before proceding to the next step. You can't skip it. If all the verifications are good, you have this little screen :
Initialisation successfull... Mlam's ready
Well done, you are ready to work on this project now !
Let's work with mlam's administration tool