Jump to content

Using PHP with MySQL - Basic code required


suprsnipes

Recommended Posts

Hi,

 

This is my first post on this forum. I have been using PHP for about a week. I recently set up a database in MySQL and I'm trying to learn the basics.

 

I was hoping that a member of this forum could give me a friendly nudge in the 'right' direction.

 

I need to make a connection to MySQL database using PHP. I want to know how to run a basic 'if' statement and display the result on the screen for each row of data that meets the criteria...

 

Is this possible?

You should really Google tutorials on this or else you will have tons and tons of questions asking people to write stuff for you.

 

The SQL will go somewhat like this -

SELECT * FROM tablename WHERE type='N'

 

Run that through mysql_query. And then use a while loop with mysql_fetch_assoc. Please read the examples in the manuals. They help. Otherwise, you'll just feel inferior by asking more questions the manual examples would have answered. :)

 

Hope this helps.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.