Welcome! Log In Create A New Profile

Advanced

Step 7 of the portfolio

Posted by KRheeder 
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
Step 7 of the portfolio
September 28, 2013 11:46AM
Hi Everyone

Don't know if Im just retarded or If Im not reading properly.
Step 7 of the portfolio is making no sense to me what so ever.

So we create the DB on MySQL ... name doesn't matter?
Now the thing that gets me is where should the code for the tables be added.
The instructions are a bit vague or I am just daft. Create a "connect page" and run the code in there to create the tables in the DB, add the code to the OOP5_select page or how should it be done?

That's the part I don't understand, the rest is easy enough.

Thank you in advance

Kevin
avatar Re: Step 7 of the portfolio
September 28, 2013 12:07PM
Creating tables is a "once-off" operation. You do not create tables each time somebody accesses your website.
The easiest is to create your database / tables using PHPMyAdmin.

If you particularly want to do it it with code, create a separate script with the database / table creation code, run it once, and then delete it from the server.
Re: Step 7 of the portfolio
September 28, 2013 08:50PM
Hi Ron

Thanks for the reply.

Yeah, I understand / know that it is a once off thing.

The way I read it from the tutorial letter is that we have to use the code to create the tables :

"Create a database on the server, and add three tables. The 1st table is named model, the 2nd table is named colour, and the 3rd table is named availability.
Use the following dump to create the tables: ........ "

If we can just create it via PHPMyAdmin then great. I just want to understand the instructions fully so that when I submit the project, I know I did everything the way it was asked.

Shot
avatar
Mac
Re: Step 7 of the portfolio
September 30, 2013 09:12AM
As per the tut letter - create the tables manually i.e. using phpMyAdmin. Most of the connection code is supplied in the code provided - you just need to complete it. And then optionally improve on the code, which will not include the connection code as it is already OO.
Re: Step 7 of the portfolio
October 02, 2013 09:22AM
Hi!

I have a code that produces the table data shown on step 7 as an addition, but my challange is that I can't find way to display more than one row as I didn't create another table but just queried the other three tables and display the results in a table data as shown in the prescribed book page 374. Also please note that I used OOP and created three functions to accomplished this.
Language: PHP
public function Get_model($model_id) public function Get_colour($colour_id) public function DisplayQuote($model, $colour)
avatar
Mac
Re: Step 7 of the portfolio
October 02, 2013 09:42AM
That is not the way to do it....
Re: Step 7 of the portfolio
October 02, 2013 01:16PM
bigron11 and KRheeder i get u guys but im confused in this way!!

my database is well connected...but when i select form list boxs for model and colour i get this

""" model selected is not available """always or do i have to create more class for available items......i jst cnt get it right.
Re: Step 7 of the portfolio
October 03, 2013 12:22PM
spinning smiley sticking its tongue outNOW I GET WHAT MUST I DO

ok
avatar
Mac
Re: Step 7 of the portfolio
October 03, 2013 12:41PM
Good. Because your [posts were a bit thin... no idea what you did or did not do. Care to write here what you have learned?
Re: Step 7 of the portfolio
October 10, 2013 01:27PM
Hi Mac

When are we receiving Tut 102 as indicated in Tut 101. See below

Further Portfolio Pages:
To be advised in tut 102.
Menu link:
To be advised
Handbook/tip:
To be advised
Task:
Until you receive tutorial letter 102 which covers OO, download the document OO1.pdf from the resources folder on myUnisa. Do the following preparatory exercise, using chapter 7 and 8 of the handbook as a companion:
Open your text editor and create a file named oo.php. Save the file, and open it in your localhost (http://localhost/oo.php). Retype the code in the OO1.pdf file over to the oo.php file, section by section. Of course you can copy it over, but it is suggested that you type it

Kind regards
Ronny KAptein
avatar
Mac
Re: Step 7 of the portfolio
October 10, 2013 01:58PM
TUT 102 has been available ages ago on myUnisa?
Sorry, only registered users may post in this forum.

Click here to login