How do websites use information on a database to create pages? - database

Sorry about the broad question. I'm just curious if someone could point me in the right direction.
Say there's a database of contact information, and there's a site where you can input a persons name and it brings you to a page with all of their information on that database. How does this happen exactly? The server would have to dynamically create this page, but does it have a generic format that it just fills with the information? And how does this happen?

Like you said, this is a an extremely broad question. It could be either way. The server could generate the entire contents dinamically, or it could be "filling the blanks" into a preformatted layout.
Google some PHP basic tutorials. That should give you a good idea about how this "dynamism" works. Sorry but your question is too broad to ellaborate more.

The server would dynamically create the page using PHP and SQL. There is a quick tutorial at http://www.mysqltutorial.org/php-querying-data-from-mysql-table/ that shows how it would be setup.

If I understood your question right, you are asking things like how this page was created, for example, in which case it can be as simple as a basic PHP and SQL combination. You can check an example on the w3sschools website:
Try it yourself example
There would be special place holders for the data and a query will extract the data and put it into the given place holders, please note, you can also use loops to add things like tables, fetch through multiple rows and so on.

Related

Many-to-Many relationship Database in Windows Phone 8.1

I have a simple task:
To build notepad with hashtags.
So user will be able to add a note and to add a list of #hashtags to it.
Basically I will have 2 objects:
Note
Hashtag
I want to be able to access all:
Assigned hashtags to a specific note by note.RelatedHashtags
Assigned notes to a specific hashtag by hashtag.RelatedNotes
It sounds like many-to-many, but I can't find any code example that I can learn from for Windows Phone. Also it sounds like I need to add a third object (table) to keep the data in the needed structure, but than how the mappings should be configured?
The most informative link I found so far:
http://www.geekchamp.com/tips/windows-phone-mango-local-database-sql-ce--association-attribute
Thank you.
The solution was quite simple - to create a third table and relate it to both Notes and Hashtags tables.
I found some very useful code example here.
P.S.: Don't forget to check Local database best practices for Windows Phone

Auto-complete and some technical in web application

I have some problems still do not understand and I need help.
In some web application like Facebook, when I type a word to find my friends or places, apps..., a suggestion list appear for me. I can traverse and choose one of them.
So I want to ask something:
Best or good tool, language or something like that to do this? I think it's jQuery. More options for me?
Which is a list item in the suggestion list called?
Where did these things from? I means: how can I create or take them? From database directly?
The answers are:
You can use jQuery coupled with a server side language that retrieve the data
Usually it's called suggestion list. These function is Google is called Google suggest
The data are retrieved from the database

Where to get an updated list of video games?

I am currently designing a reviews site for video games similar to gamespot am wondering where and if there is an online database that contains information such as name, publisher, release date etc with an API. I dont really want to have to enter each title manually or let users enter the title manually.
Where do these large sites get information like this? I wouldn't think it would be manually. I know for movies IMDB exists.
How would I go about adding it to my database?
Thanks
May I point you to web scraping?
Be sure to read the section legal issues and on well-behaved bots.
There's always Amazon and their product advertising API. Some older, but interesting code snippets can be found on this page.
If you know Perl, there is an amzing module called WWW::Mechanize
Pretty much you can write a script to get to any website and grab any data you need.
So for example you can go to www.gamespot.com, get list like the one below and put them in your database.
http://www.gamespot.com/games.html?platform=1029&mode=all&sort=views&dlx_type=all&sortdir=asc&official=all&tag=games%3Bfooter%3Bmore

Can we create table for wordpress?

I am very new to wordress. I have a appointment form. While submitting a form i need to save those information from the form to the database. I created a table of my own lets say wp_appointment and saved the information to this table. Now what i want to know is that is this a good way to do so or is there any solution to this. And i need to display those information in admin section and update. Is it possible? Please do suggest me if i can do or not.
Thanks in advance
Now what i want to know is that is
this a good way to do so or is there
any solution to this.
Yes, this is the ideal way to doing this. Besides, there is something to consider:
For ease of use and compatability, you can use wordpress's built-in database functions. Check this one: wpdb Class
And i need to display those
information in admin section and
update. Is it possible?
Sure. You can create a custom admin page and show/make editable them in there. As a start point check this link: Adding Administration Menus. You can apply the instructions told there to your function.php file to have custom pages without create an "external plugin".
To answer your questions: Yes, it's possible. And what you described is being done by current calendar plugins.
Here is one:
http://wordpress.org/extend/plugins/events-calendar/
I would take a look at their code to see how they implement something similar to your idea.

Access to facebook data

I want to access facebook's database.
I want to have some SQL-like access, let's like this:
"select name from facebook-big-database-table where location='France' and city='Paris' and age
between 30 and 40;"
But, it need not to be SQL, PHP or JAVA would also be nice to use to me.
Does anybody know where to start?
To be honest, I got a little bit lost in all the tutorials Facebook offers.
Is it the so called "Connect" program which offers me what I want or something different?
Facebook does have a bunch of API's, one of which actually looks like SQL. They call it FQL. Check it out here. Maybe it can help you some part of the way at least.
Note that it won't give you raw access to the underlying tables. But still, better than nothing I guess.
Facebook isn't going to let you mine their database in that way. Not possible.
You wont be able to access facebook's database. The most you'd be able to do is to get information of users who previously have consented your application to access their data.
Therefore answering your question, what you want can't be done, period.

Resources