13Kinseyd
Badges: 2
Rep:
?
#1
Report Thread starter 2 years ago
#1
As a computer science student I have a large involvement with coding and programming and for my A - level project, I've decided that I want to make a website for my project with an advanced algorithm. Although I am yet to look into my advanced algorithm (Which I will most likely be coming back here for). I've ran into an issue that I cant exactly solve. On my Website. KinseyTester.epizy.com - I am trying to make a search program to search several tables for key words. If anyone has any ideas I would appreciate.
0
reply
winterscoming
Badges: 19
Rep:
?
#2
Report 2 years ago
#2
Have you got an example of what the data and the table structure/s look like? Without knowing anything about the data you're querying it's pretty hard to suggest a solution, but if you manage to get your database schema right, then it should be a fairly simple SQL statement with a WHERE clause.

When you design your database schema you need to keep your queries in mind, and use those to inform the tables you create, their fields, relationships, etc. One of the goals should be to have a database schema which is easily queryable, so if it seems difficult, there might be ways to improve the structure of your database.
Last edited by winterscoming; 2 years ago
0
reply
DanK37
Badges: 6
Rep:
?
#3
Report 2 years ago
#3
(Original post by winterscoming)
Have you got an example of what the data and the table structure/s look like? Without knowing anything about the data you're querying it's pretty hard to suggest a solution, but if you manage to get your database schema right, then it should be a fairly simple SQL statement with a WHERE clause.

When you design your database schema you need to keep your queries in mind, and use those to inform the tables you create, their fields, relationships, etc. One of the goals should be to have a database schema which is easily queryable, so if it seems difficult, there might be ways to improve the structure of your database.
(Original post by ltsmith)
tell us more about the structure of your tables and we might be able to help
Sorry I was on the wrong account as well as redirecting you to the incorrect website. http://kinsey.epizy.com/ is the correct website in which you should have been lead to.
I will put a PastedBin of all the code in the website page for Exercise below. Hopefully this helps. If there is any questions please quote this account and reply. Much regards,

http://pasted.co/f98f798a

Dan


I want it to show all the databases on the search table (preferably in alphabetical order) and then have the ability to refine as you search.
Last edited by DanK37; 2 years ago
0
reply
winterscoming
Badges: 19
Rep:
?
#4
Report 2 years ago
#4
(Original post by DanK37)
I want it to show all the databases on the search table (preferably in alphabetical order) and then have the ability to refine as you search.
But what does your database (SQL) actually look like? i.e. your entity-relationship model that shows how the data is stored in the database (tables, fields, relationships, etc.). The webpage/HTML isn't going to affect your database query.
Last edited by winterscoming; 2 years ago
0
reply
DanK37
Badges: 6
Rep:
?
#5
Report 2 years ago
#5
(Original post by winterscoming)
But what does your database (SQL) actually look like? i.e. your entity-relationship model that shows how the data is stored in the database (tables, fields, relationships, etc.). The webpage/HTML isn't going to affect your database query.
Im not sure what you mean
0
reply
winterscoming
Badges: 19
Rep:
?
#6
Report 2 years ago
#6
(Original post by DanK37)
Im not sure what you mean
I mean the data that you're actually trying to search - at the moment it looks like your app doesn't really use any data and everything looks like it's hard-wired directly into your HTML, but there are better ways by generating HTML using PHP instead, but you'll need that to be able to write the search algorithm and display the search results anyway.

Have you created a database using SQL yet? If not, that's the next thing to do. From your original post I was under the impression that you'd already done this, but if you haven't then It's a good idea to start out with just one SQL database table just to get something working.

Normally web apps using PHP would use that to generate the HTML - you've obviously got a lot of copy+pasted HTML elements on that page. here's a fairly minimal example of using some data from a database to create tables on a webpage:
https://www.w3schools.com/php/showph...elect_oo_table

(Obviously you could do the same thing to generate bootstrap/flexbox grid content with <div> or whatever else instead)
Last edited by winterscoming; 2 years ago
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Do you think receiving Teacher Assessed Grades will impact your future?

I'm worried it will negatively impact me getting into university/college (183)
43.88%
I'm worried that I’m not academically prepared for the next stage in my educational journey (48)
11.51%
I'm worried it will impact my future career (33)
7.91%
I'm worried that my grades will be seen as ‘lesser’ because I didn’t take exams (88)
21.1%
I don’t think that receiving these grades will impact my future (41)
9.83%
I think that receiving these grades will affect me in another way (let us know in the discussion!) (24)
5.76%

Watched Threads

View All