Jump to content

Recommended Posts

okay i am gonna use this post as my general help in php and mysql. instead of starting new threads when i have questions. :)

 

 

Okay my first thing i want to know is how would i query the database and display just something basic

 

okay i got a table called Books. 

 

and i have  5 fields in the books table

 

title | Id | Comment | Date | Writer

 

okay now i want to display  a top ten

 

how would i query the database with php  and display.

 

the last books submitted with a comment. ( so latest 10 books with comments left.

 

and then display it

 

Title - Writer - Comment  - Date

 

 

 

and since i am learning something basic like this  without coding it correct wqould it be some sort of security risk

 

Link to comment
https://forums.phpfreaks.com/topic/205942-trying-to-learn-phpmysql/
Share on other sites

I'm going to recommend to you www.w3schools.org to learn PHP as that's where i started.

 

I know it's not helpful to what you want to know, but what you think you might need to start with may not necessarily be a GOOD place to start.

 

The first things you should learn is basic syntax, such as the echo command, how variables work and the if..then...else statement. Then move on to using arrays, looping statements etc.

 

I'd only recommend learning how to use database integration and MySQL after you've covered the basics of the PHP language.

 

I'd also recommend learning to code in SQL as that is the language you would need to learn to create a connection between PHP and MySQL

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.