0

I am new to PHP and MySQL, can I get a smiple example of how to write the connection string, getting the results from a table with some columns and displaying them? Thank you!

2
  • 2
    I know I am being a JERK, but have you just tried googling "php mysql example"? This thing is OVER documented. Commented Nov 11, 2010 at 13:05
  • Google is still better than SO for such questions... if SO is better, then google will show you SO... means Google is always better for such questions. Commented Nov 11, 2010 at 13:26

2 Answers 2

2

The PHP manual has full working examples.

Sign up to request clarification or add additional context in comments.

2 Comments

I'm curious, why do you recommended mysqli for smaller projects?
@Stephen ah humbug, I mixed it up with mysqlite - I'm not very familiar with both. Time for lunch :) Fixed, cheers.
0

http://php.net/mysql_connect
http://php.net/mysql_select_db
http://php.net/mysql_query

in that order. :)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.