Welcome! Log In Create A New Profile

Advanced

Practical

Posted by Mac 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar
Mac
Practical
August 25, 2010 09:32AM
I have made the practical project available for download.
Re: Practical
August 25, 2010 11:28AM
Thanks mac, can't wait to sink my teeth into this.
Re: Practical
August 25, 2010 01:03PM
Is this THE FINAL Poject mac? or is it just a practicesmile
Re: Practical
August 25, 2010 01:15PM
xmgcoyi Wrote:
-------------------------------------------------------
> Is this THE FINAL Poject mac? or is it just a
> practicesmile

I posted this before I read the TUT letterhot smiley
avatar Re: Practical
August 26, 2010 02:12PM
Wats the due date?

gbakamela [77234715]
avatar
Mac
Re: Practical
September 01, 2010 06:48AM
Will say soon.
Re: Practical
September 01, 2010 11:38AM
mac

i am not sure if this is covered in the details but i did not see it but are we allowed to use frameworks in the prac?
avatar
Mac
Re: Practical
September 01, 2010 02:25PM
Nope..... then I'll have to give marks to those guys that developed the framework smiling smiley This is a raw-code course...!
Re: Practical
September 01, 2010 04:45PM
Where do we find the download for the project?
Re: Practical
September 01, 2010 06:09PM
rogerdurbs,

Take a look at the course home page & go to where you downloaded your tutorial letter. There's a link there marked prac.
Re: Practical
September 02, 2010 03:14PM
@AlessioLaRuffa,

Ah, thats what happens when you dont go back to the sites given in the begining!
Thanx!!
Re: Practical
September 02, 2010 03:31PM
Are we allowed to use Javascript or purely PHP?
avatar
Mac
Re: Practical
September 03, 2010 07:20AM
You can use Javascript, no problem. However, try to use PHP as much as you can, e.g. rather validate inputs with PHP.
Re: Practical
September 06, 2010 07:26AM
Ok cool. I posted that and then 5 mins later saw in the prac pdf you did say no JS. I guess this practical is not about working nicely as much as testing pure PHP skills! Thanx!!!
Re: Practical
September 07, 2010 07:13AM
One last question. On the prac.pdf you say "all code related to managing the course (MC1 -> MC2) must fit in course_man.php". So that means code to commit db queries etc also has to be split onto the relevant pages when submitting forms?
avatar
Mac
Re: Practical
September 07, 2010 12:03PM
Exactly!
Re: Practical
September 07, 2010 01:42PM
sorry to nitpick Mac but this is a registration system for students and you have a NOT NULL column for a work telephone number?confused smiley

Just a thought
Re: Practical
September 07, 2010 06:42PM
Can we style our prac with some CSS?

Or are you interested in the code only?
avatar
Mac
Re: Practical
September 08, 2010 07:06AM
MicheleC Wrote:
-------------------------------------------------------
> sorry to nitpick Mac but this is a registration
> system for students and you have a NOT NULL column
> for a work telephone number?confused smiley
>
> Just a thought

Assume that this is a registration system for a company that offers training courses to workers of large companies smiling smiley I am interested in how you code what was given. I am not going to sell this to companies afterwards smiling smiley
avatar
Mac
Re: Practical
September 08, 2010 07:06AM
AlessioLaRuffa Wrote:
-------------------------------------------------------
> Can we style our prac with some CSS?
>
> Or are you interested in the code only?


You must style it with CSS...!


EDIT - no, I lie. I was confused with my ohther course here - sorry smiling smiley Whatever you want....
Re: Practical
September 08, 2010 11:19AM
Fantastic, thanks Mac.
Re: Practical
September 08, 2010 07:32PM
On the Prac.pdf you say that deleting a course will also delete all students registered for that course.

Would that just be the link to the course in course_student or the actual student from students table as well?
avatar
Mac
Re: Practical
September 09, 2010 11:12AM
Everything related to the course ceases to exist. In real life you would wan to keep a record of students who did a course (even if it is not offered anymore), but here just delete all traces to a course.
avatar Re: Practical
September 09, 2010 01:15PM
@mac,

the prac pdf doesn't say what to name the database.

Also, in submitting the project, the folder structure doesn't include where we should place the database files? confused smiley

Please advise. drinking smiley

>>>
The One that owns The Technology rulez the world!
avatar Re: Practical
September 09, 2010 01:17PM
@mac,

oh ma bad, the database name is "registration". thumbs up smiley

What abt my second quest though?

>>>
The One that owns The Technology rulez the world!
Re: Practical
September 09, 2010 01:21PM
@theSinthesizer

The database should be named "registration".

@Mac:

I get the following error when pasting the code into the SQL tab:

Quote

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`sno` int(6) NOT NULL auto_increment, `sname` varchar(40) NOT NULL default '', `' at line 2

I've dropped the tables numerous times, same thing over & over again.

Using MySQL 5.1.44, if that makes a difference?
avatar Re: Practical
September 09, 2010 02:40PM
@mac or any other brainiac

i found the following generic code on the Web for adding users to a database:

Language: SQL
GRANT privileges ON databasename.tablename TO username IDENTIFIED BY ';password';;

I modified it to suite the project:

Language: SQL
GRANT ALL ON registration.* TO root IDENTIFIED BY ';';;

As you can see, I gave myself the username "root" and no password with all privaledges to all the tables in the registration database.

When I go to the "mysql" database's table "db" everything looks good ( I have all the priveledges).

But, on the "user" table it says "N" - No - for all the priveledges. Why?

Also, it's written "%" for the host on the "user" table. Does this mean that the host is "localhost"? Could the "%" refer to "localhost" and it's there because it doesn't want to duplicate the same line?

I hope this makes sense and I don't sound like some space monkey. cool smiley

>>>
The One that owns The Technology rulez the world!
Re: Practical
September 09, 2010 03:24PM
Okay, I improvised and manually added all the tables myself, this is the dump of my "student" table:
Language: SQL
-- phpMyAdmin SQL Dump -- version 3.2.5 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Sep 09, 2010 at 03:21 PM -- Server version: 5.1.44 -- PHP Version: 5.3.2   SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";   -- -- Database: `registration` --   -- --------------------------------------------------------   -- -- Table structure for table `student` --   CREATE TABLE `student` ( `sno` INT(6) NOT NULL AUTO_INCREMENT, `sname` VARCHAR(40) NOT NULL DEFAULT ';';, `init` VARCHAR(5) NOT NULL DEFAULT ';';, `fname` VARCHAR(40) NOT NULL DEFAULT ';';, `title` VARCHAR(4) NOT NULL DEFAULT ';';, `msname` VARCHAR(40) NOT NULL DEFAULT ';';, `dob` VARCHAR(8) NOT NULL DEFAULT ';';, `sex` CHAR(2) NOT NULL DEFAULT ';';, `lang` VARCHAR(10) NOT NULL DEFAULT ';';, `idno` VARCHAR(13) NOT NULL DEFAULT ';';, `telh` VARCHAR(12) NOT NULL DEFAULT ';';, `telw` VARCHAR(12) NOT NULL DEFAULT ';';, `cel` VARCHAR(12) NOT NULL DEFAULT ';';, `fax` VARCHAR(12) NOT NULL DEFAULT ';';, `email` VARCHAR(40) NOT NULL DEFAULT ';';, `address` tinytext NOT NULL, PRIMARY KEY (`sno`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;   -- -- Dumping data for table `student` --

Will it still be valid?
Re: Practical
September 09, 2010 06:26PM
Just to be 100% sure on this.
course_students links a student to a course.
What should i store in the year field? Just "2010"?
Then on delete il remove the course_students rec and the student rec?
Can a student not link to multiple courses?
avatar
Mac
Re: Practical
September 10, 2010 07:10AM
theSinthesizer Wrote:
-------------------------------------------------------
> @mac,
>
> oh ma bad, the database name is "registration".
> thumbs up smiley
>
> What abt my second quest though?

I have the structure... you are using it smiling smiley
Sorry, only registered users may post in this forum.

Click here to login