₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,347,694 members, 8,528,833 topics. Date: Thursday, 03 December 2026 at 03:09 AM

Toggle theme

Adewasco2k's Posts

Nairaland Forum › Adewasco2k's Profile › Adewasco2k's Posts

1 2 3 4 5 6 7 8 ... 53 54 55 56 57 58 59 60 61 (of 126 pages)

Jobs/Vacancies › Re: Jobs Section Moderator Helpline: Your Comments & Complaints Here by adewasco2k(m): 12:43pm On Oct 15, 2013
Sam0: Pls i would like to know if Nigerian Airforce has started shortlisting candidates for DSSC
ask on the appropriate threads

https://www.nairaland.com/1262605/nigerian-navy-dssc-2013-2014/
https://www.nairaland.com/1233736/nigerian-army-dssc-scc-2013/
Webmasters › Re: Responsive Web Design Tutorial From Scratch by adewasco2k(m): 12:33pm On Oct 15, 2013
I hope after this i will come up with my own responsive site for my online services.

Nice on bro
Webmasters › Re: Post your PHP Problems Here by adewasco2k(m): 12:29pm On Oct 15, 2013
This is so long, i hope you get it, just trying to show you all you might need to know and i didnt do any php, just the database stuff, that is what you first need to get right.

I will take it step by step.

STEP 1 created a database "resultChecker"
CREATE DATABASE resultChecker;


STEP 2 creating tables in the database

i. create table in the database 'categories'

CREATE TABLE IF NOT EXISTS `categories` 
(
`catID` int(11) NOT NULL AUTO_INCREMENT,
`desc` varchar(200) NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;


We need to add some dummy contents to work with:

INSERT INTO `categories` 
(`catID`, `desc`)
VALUES
(1, 'general'),
(2, 'commercial'),
(3, 'arts'),
(4, 'sciences');


https://i41.tinypic.com/2dje8fb.png

ii. created table in database 'subjects'

CREATE TABLE IF NOT EXISTS `subjects`
(
`stubjectID` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(200) NOT NULL,
`cat_id` int(11) NOT NULL,
KEY `categories` (`cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;


add foreign keys, may be you should read about foreign keys

ALTER TABLE `subjects`
ADD CONSTRAINT `subjects_ibfk_1`
FOREIGN KEY (`cat_id`) REFERENCES `categories` (`catID`) ON DELETE CASCADE ON UPDATE CASCADE;


to add dummy content:

INSERT INTO `subjects` (`stubjectID`, `name`, `cat_id`) 
VALUES
(1, 'english language', 1),
(2, 'mathematics', 1),
(3, 'chemistry', 4),
(4, 'physics', 4),
(5, 'commerce', 2),
(6, 'geographic', 2),
(7, 'government', 3),
(8, 'Literature in English', 3);


https://i40.tinypic.com/2iqbor9.png

iii.created a table in database 'students'


CREATE TABLE IF NOT EXISTS `students` 
(
`studentID` int(11) NOT NULL AUTO_INCREMENT,
`sname` varchar(250) NOT NULL,
`cat_id` int(11) NOT NULL,
`reg_no` varchar(20) NOT NULL,
`year` year(4) NOT NULL,
`center` varchar(200) NOT NULL,
KEY `cat_id` (`cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;


add foreign key:

ALTER TABLE `students`
ADD CONSTRAINT `students_ibfk_1`
FOREIGN KEY (`cat_id`) REFERENCES `categories` (`catID`) ON DELETE CASCADE ON UPDATE CASCADE;


add dummy content:

INSERT INTO `students` (`studentID`, `sname`, `cat_id`, `reg_no`, `year`, `center`) 
VALUES
(1, 'Dale Samuel Daniel', 4, '4012344FG', 2013, 'Ajah, Lagos'),
(2, 'Jane Django', 2, '4012347HG', 2013, 'Ikeja, Lagos'),
(3, 'Seun Kamorudeen lol', 3, '4012387DF', 2013, 'Ota, Ogun');


https://i40.tinypic.com/20uak20.png

iv. created a table called 'results'

CREATE TABLE IF NOT EXISTS `results` 
(
`student_id` int(11) NOT NULL,
`subject_id` int(11) NOT NULL,
`grade` varchar(2) NOT NULL,
KEY `student_id` (`student_id`),
KEY `subject_id` (`subject_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


add foreign key:

ALTER TABLE `results`
ADD CONSTRAINT `results_ibfk_4`
FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`stubjectID`) ON DELETE CASCADE ON UPDATE CASCADE,

ADD CONSTRAINT `results_ibfk_3`
FOREIGN KEY (`student_id`) REFERENCES `students` (`studentID`) ON DELETE CASCADE ON UPDATE CASCADE;


to add contents:

INSERT INTO `results` (`student_id`, `subject_id`, `grade`) 
VALUES
(1, 1, 'C4'),
(1, 2, 'C6'),
(1, 3, 'E8'),
(1, 4, 'F9'),
(2, 1, 'F9'),
(2, 2, 'E8'),
(2, 6, 'C4'),
(2, 5, 'C5'),
(3, 1, 'C4'),
(3, 2, 'F9'),
(3, 7, 'E8'),
(3, 8, 'D7');


https://i44.tinypic.com/29kz3wy.png

This shows the relationship between the tables:
https://i43.tinypic.com/ehn805.png

with all these all you need to do is query your tables to get all you want.

example 1 to get the results of student with studentID of 2 which is 'Jane Django'

SELECT subjects.name, results.grade FROM subjects, results
WHERE subjects.stubjectID=results.subject_id
AND results.student_id=2


result:
https://i41.tinypic.com/23h58oy.png

example 2 to get the result of a student with a name seun who is the art student here

SELECT subjects.name, results.grade FROM subjects, results WHERE subjects.stubjectID=results.subject_id
AND results.student_id=(SELECT students.studentID FROM students WHERE students.sname LIKE ('%seun%'))


results:
https://i41.tinypic.com/zwgu46.png

example 3 to get the details of a student like year of exam, exam center and registration number using his name to find it or his reg no

SELECT * FROM students WHERE sname LIKE('%seun%')


or

SELECT * FROM students WHERE reg_no='4012387DF'


results
https://i40.tinypic.com/23iz1h2.png

example 4: you can equally get the list of subjects that the student offers and the corresponding grades even if the student didnt write the exam.

//for example if a science student didnt write chemistry exam the result will be like

english  | C6
math | E8
chemistry| NULL
physics | F9


here i have delete the physic result of the science student, see how i will query the table now using LEFT JOIN:

SELECT subjects.name, results.grade FROM subjects 
LEFT JOIN results ON subjects.stubjectID=results.subject_id
AND results.student_id=1
WHERE subjects.cat_id IN((SELECT cat_id FROM students WHERE studentID=1),1)


result:
https://i39.tinypic.com/2eg9yxe.png

so now you have your database all you have to do is add more details to the table as you wish i just did it simple to make it clearer.

cheers
Programming › Re: Does Anyone Can Solve This Problem? by adewasco2k(m): 9:08am On Oct 15, 2013
bigbag: Does anyone use PHP codes to build a website? The data base is MYSQL, when I tried to change a hosting,but failed,can anyone solve this problem?
Still wondering what the problem is, you didn't say much about what you want.
Webmasters › Re: Post your PHP Problems Here by adewasco2k(m): 11:46pm On Oct 14, 2013
^^I did it, major work was just on the database design, had to even to 'over normalization' to show him how it works working with such.

I will share results tomorrow morning when connected via PC.
Jobs/Vacancies › Re: Jobs Section Moderator Helpline: Your Comments & Complaints Here by adewasco2k(m): 7:13pm On Oct 14, 2013
DammyFx: mod please what blunder did i (luvola ) commit for my barring of posting .. When will my ban be lifted ? What mistake did i make in the uba thread i opened that got me banned? Thanks
Please send a PM to the mod that banned you.

Thanks
Webmasters › Re: Post your PHP Problems Here by adewasco2k(m): 7:52am On Oct 14, 2013
^now I know your problem, like I have said before, database is not like excel, you will not get good result from your present design.

But if you insist to carry on with it then use,

SELECT name, eng, math, etc. (List all subjects) FROM results WHERE reg=1 AND (eng, math, etc (list all subjects again)!=NULL

mind you, you will get a column of name, eng, math .....

If you want to have it list you said having all the subjects in a column and not roll then your best bet is PiVOT but as I have said your approach is wrong.

With what I did above you will still achieve your aim, after getting the result in that format, you will use php to arrange it like you want.

If less work on my table today, will code it for you.

Have a wonderful monday
Family › Re: Husband Abuse! Please Help, My Wife Is Overknocking Me by adewasco2k(m): 10:55pm On Oct 13, 2013
This is so funny! Thanks for the late night joke
Webmasters › Re: Post your PHP Problems Here by adewasco2k(m): 9:05pm On Oct 13, 2013
[quote author= d citizen]@ adewasco2k

have u seen a waec broadsheet. It contains result of students dat offer science, commercial and art based subject togther.

I need a clue on how to extract the result of each student without including other subject
. It is not compulsory for all science student or commercial or art to offer the same subject.

. I need a guide pls. i donot need separate table for science, commercial and art students result[/quote]That is why I keep seeking more details, I think I understand what you want now.

If I understand you well, you want if for example a science student is to check his result, only science subjects should appear irrespective if he sat for the paper?

That's still simple enough, this are no maggic, you have to signify it. Somewhere on the table.

As I suggested, you should have a table for subjects

So you can have subject_table with columns, subject_id, subject_name, subject_category.

So you can have for example:

Subject_id | subject_name | subject_category. |
1 | physic | 1 |
2 | mathematics | 2 |
3 | commerce | 3 |
4 | government. | 4 |
5 | english | 2 |
6 | lit english | 4 |
I am sorry I am on mobile can't say much but what I am trying to do it set all the subjects into different categories: general, like english and math, art subjects, commercial subjects, science subjects

So when you want to query your database just use LEFT JOIN on the subject where subject.subject_category IN (2, 1 ) for a science student.

Since 2 is for general subject and 1 for sciences.

This is just an eye opener to how you can achieve that, please try to do something then post then we can help from there.
Webmasters › Re: Post your PHP Problems Here by adewasco2k(m): 5:17pm On Oct 13, 2013
^when dealing with database, don't look at it like your normal spreadsheet.

Try normalizing your tables.

There are many ways you can achieve what you seek.

You can have a table holding students details with a column which will signify if a student is a science student, commercial or art also a column for student_id

So on your result table

You should have all results in this format.

Student_id, subjects, mark

So if you a result of a science student, you should not be concern about art, because the student will only have results for subjects he is offering.

So all you have to do is,

SELECT subject, mark FROM results_table WHERE student_id=$x

Now the variable $x hold the student Id from the student details table.

So with such aproach I dnt see you having problems if a student is science student or not.

You might even go further to have a table for subjects, so you have subject_id, subject_name.

So on your result you have a foreign key subject_id. Which will be referencing the subject_id on the subject table.

This looks simple to me, but still I dnt think you are giving key details of what you are doing and what you want to achieve
Webmasters › Re: In Urgent Need Of A Web Site Designer... by adewasco2k(m): 12:02am On Oct 13, 2013
yemioloyede: in need of a web site designer.. kindly reach me here or yemioloyedeofficial@gmail.com.. thanks...
i think you guys should start respecting web designers/developers, so you want them now to start sending you mails?

If you are serious you will give details here and if any body is ready he can send you a mail, rather than allowing our big guys send you mails then you start begging to pay 10k for a site grin
Programming › Learn To Code By Breaking Someone Else's Code by adewasco2k(op): 11:47pm On Oct 12, 2013
https://img.gawkerassets.com/img/192kp7ido19nrjpg/original.jpg
One of the best techniques to learn to code is to reverse engineer existing code. Code training company Treehouse explains how to "break" code to better understand how it works.

Nick Pettit gives an example on the Treehouse blog of wanting to learn about 3D programming in the browser and testing a line of a Javascript script, Three.js:

The following is a code example that uses three.js to create a light:

    var light = new THREE.PointLight(0xffffff);
light.position.set(-100,200,100);
scene.add(light);


If you have some programming experience, you might be able to read this and figure out most of what’s happening here. If there are any blanks or assumptions you’re unsure about, you can test them with the following techniques:

1. Delete one line at a time to see if it’s necessary for your goals.
2. Delete one line at a time to better understand its function. Even if you think you know what a line does, try deleting it anyway to test your assumptions.
3. Change variables and function arguments to see if you can manipulate them in a way that matches your mental model.
4. Swap the order of various lines to see if things can be done “out of order” or if there’s some significance to the sequence of operations.

As you test each line, you’ll start to build a mental model and make corrections to other assumptions you made previously. Soon, the whole picture will start to make sense.

The key is to break one thing at a time and see what changes so you can understand the relationship between all the parts in the code.

Self-taught programmers likely already know the great value of reverse engineering others' code, but as Treehouse points out, this strategy doesn't get enough emphasis. Thanks to generously shared open source code, you can learn just about anything by breaking it.

Source
Webmasters › Re: Post your PHP Problems Here by adewasco2k(m): 11:27pm On Oct 12, 2013
Djangocode: Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??
hmmm, was just trying to see how i will handle such a situation.

* presently the site is static and in html

That is a big problem, i dont know if there is a way around it but for this to work in php, you have to first make the site dynamic, even if the site contents are not coming from a database, they should be in php strings.

if you can achieve that then you can always use


strpos() or
preg_match()


I really am lost with such and hope to see others contribute as i will also like to know a smart way around such a problem
Webmasters › Re: Post your PHP Problems Here by adewasco2k(m): 7:09pm On Oct 12, 2013
[quote author= d citizen]Am planning to design a web application using php and mysql for checking result and i need a clue to accomplish this feat. We have three department, science, commercial and art and a common broadsheet for the three departments. However, i want the result of each of the student to display the subject results they offer jst like dat of waec. How will i go by this? I jst need ur guidance and i will do the rest[/quote]You still didn't give much details, I have done a school portal with php and mysql.

You need to have a well designed application.

Give a systematic detail.
Computers › Re: √√ Huawei Old/New Modem Unlocking Codes Request [ ONLY HERE ] by adewasco2k(m): 11:32pm On Oct 11, 2013
redsquare: Please help me with this unlock code, it is the new mtn modem, model: 303s-1, IMEI: 868988011076988, s/n: u9cbya92b1610707. Thank you.
NCK: 16557583
Webmasters › Re: Creating Business Card. Help! by adewasco2k(m): 11:10pm On Oct 11, 2013
Sdtosin: Hello Nairalanders. How can I design a good business card with Microsoft publisher 2010. Ur response is urgently needed. Thanks in advance.
Try posting it here Art, Graphics & Video

i dont use Ms Publisher, i do use photoshop
Webmasters › Re: Top Nigerian Google Adense Earners by adewasco2k(m): 11:07pm On Oct 11, 2013
JideTheBlogger: Just passing
oga say something ooo, we know you should be smiling to the bank every month on Google adsense grin
Webmasters › Re: Has My Site Been Hacked? by adewasco2k(m): 11:04pm On Oct 11, 2013
hilaryiwens05: Pls my website has been hacked...how do I resovle dis... www.hitinfotech.com
contact slyr0x he is an expert or reach me via info@wasconet.com, i can sure get it fixed
Jobs/Vacancies › Re: Jobs Section Moderator Helpline: Your Comments & Complaints Here by adewasco2k(m): 7:10pm On Oct 11, 2013
^We are no HR you can open a thread to hear from other members.

ref: https://www.nairaland.com/1301121/suspected-scam-job-letter-offer
Business › Re: Using Payoneer Account To Verify Paypal - Be Aware of Latest (Updated) Info by adewasco2k(m): 7:05pm On Oct 11, 2013
presegsADESIDA: Great question in here as it depends on their choice as they can either decide to use VPN or betterstill,they can call PayPal while in USA to get them informed that they will be coming to Nigeria and they will like to be operating their PayPal from Nigeria.
PayPal will tell them to make a call when they get to Nigeria & PayPal will know how to specially whitelist their IP and account.
Hope understood?
thanks, now i understand
Webmasters › Re: Post your PHP Problems Here by adewasco2k(m): 1:05pm On Oct 11, 2013
This is no php problem but since there are few JS guys here which I happen not to be one for now.

I am working on a project, I have a data table, I am looking for a way to achieve this:

When you click on a data it should become editable!

So if there was 5 if I click I can now change it to 8 and. Also update the database.

Hmmmm, I know it is possible, I am trying Jquery but I want to know if there are any best way to such.
Computers › Re: Huawei USB Modem Unlocker - Download Here! by adewasco2k(m): 12:02pm On Oct 11, 2013
dadaniyi: Goodmoring.

Thanks for all your help. Kindly help me unlock dis MTN fastlink modem


Modem : E1550
Model : Huawei E1550
IMEI : 354638046924865
Serial NR. : B5A4CA10B1126667

Thanks.
52089524
Computers › Re: Huawei USB Modem Unlocker - Download Here! by adewasco2k(m): 12:01pm On Oct 11, 2013
Rasprince: Please help me to unlock my huawei e173 modem IMEI 865633013067576
29829936
Webmasters › Re: Post your PHP Problems Here by adewasco2k(m): 11:59am On Oct 11, 2013
CALEB65: pls guys. I've been having dis upload problem d error is ''mysql server has gone away'' error reading result sets header''. Pls help. Wat should I do??
That's one error message that always get me to lol..

Their are ways to increase the wait time of your server, but before I can address that, can you say what you were trying to upload and if possible give us your SQL statement.

If you are uploading a file you should upload to your host directory and store just the name in your database.
Business › Re: Using Payoneer Account To Verify Paypal - Be Aware of Latest (Updated) Info by adewasco2k(m): 11:25am On Oct 11, 2013
I have being wondering this, a lot of my pals in the UK or USA who are using paypal, is it that when they come back to Nigeria they can not operate their account except via VPN? Also if a white visits Nigeria. He can not make any only transaction via paypal whilst in Nigeria?

I can't just figure this out
Computers › Re: √√ Huawei Old/New Modem Unlocking Codes Request [ ONLY HERE ] by adewasco2k(m): 10:55am On Oct 11, 2013
Adeoye Adekunle: Pls my pple. Which model of universal modem is d best?
My humble advice, don't buy any pre-universal modem, they are mostly all fake.

Buy MTN's Huawei E303 and unlock it.
That's your best deal
Webmasters › Re: Tips On How To Automatically Register Users Of My Old Site Into Another One. by adewasco2k(m): 10:52am On Oct 11, 2013
exporting will definitely work but a lot have to be put into consideration.


Just export and import first then if it doesn't work at once you might need to open the backup.sql to edit some things

But finally it is very possible
Webmasters › Re: How Do I Insert Hyperlinks In A Nairaland Post? by adewasco2k(m): 10:38am On Oct 11, 2013
You can also use http://tinypic.com to upload your picture, copy the link after upload and insert it in between the img tags

[img]http: //tinypic.com/FtRFTD[/img]

Thazall
Webmasters › Re: Need Help To Cash My Adsense Cheque by adewasco2k(m): 4:52pm On Oct 10, 2013
Jerrypalz: If una fit dash me 15k ($100) 2 open a domiciliary account. Mak u reply.
i will give it to you but you have to work for it.....help clean my babes butt

deal?
Jobs/Vacancies › Re: Job Library 2013 by adewasco2k(m):
Politics › Re: 180 Boko-haram Insurgents Killed By Camerounian Soldiers by adewasco2k(m): 11:03am On Oct 10, 2013
[quote author=Austine.E]....it is called 'false flag' in intelligence parlance,since cameroun has become the new heaven of boko-haram group and after much diplomatic moves by Nigerian government to make camerounian authorities see reason why these inglorious bastards shld be flushed,seemed to have failed.The intelligence community choose option 'B',disguise and hit the gendarmes in a boko-haram fashion and all hell will be let loose...My gratitude goes to the Nigerian intelligence community and the reactionary cameronian gendarmes!!![/quote]This might not be true but bro, I respect the way you think
Webmasters › Re: Has My Site Been Hacked? by adewasco2k(m): 10:09am On Oct 10, 2013
This is why I always kick against free templates!

Hope you have learnt your lesson now?

1 2 3 4 5 6 7 8 ... 53 54 55 56 57 58 59 60 61 (of 126 pages)