Mini Course on PHP - News system (Update user) - Lesson 14


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (4 votes, average: 5.00 out of 5)
Loading ... Loading ...

Hello everybody! Today we do one more lesson from our mini-course. To conclude the basic steps with Mysql, missing only know how to update the data from the database.

These basic steps are called CRUD, see this link on Wiki for more details: http://pt.wikipedia.org/wiki/CRUD

You've already learned that to enter data into the database using the command INSERT ;
You've already learned that to select data from database using the command SELECT ;
You've learned what to delete data from the database using the command DELETE ;
Lack only the UPDATE.

The UPDATE command is used to update data from the database. Below is the command syntax:

Read the rest of this entry »

Mini Course on PHP - System news (Delete User) - Lesson 13


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (4 votes, average: 4.75, 5)
Loading ... Loading ...

Good staff, our course is walking a bit slow - I admit - but I promise it will not stop. I will make every effort to finalize it. I have received several e-mails praising the content and asking for more posts. I am very happy to see that the contents of my blog is being helpful.

Today we will learn how to delete a record from the database. In the last lesson we saw how to enter data (INSERT) in the bank and how to select (SELECT) to display them.

Below is how the SQL code to perform this task:

  1. DELETE FROM table_name

But almost ALWAYS will be deleted one (s) record (s) specific (s) of the database. This is where the ID field to create the table, you remember? It serves to create a whole number and is always incremented, ie, never have two records with the same ID. This ID will be used to specify 'who' will be deleted. So here's how one would complete SQL code:

Read the rest of this entry »

Mini Course on PHP - System News (tip)


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (5 votes, average: 4.40 out of 5)
Loading ... Loading ...

Well folks, here was the system of putting news on the air, or rather the part of the system we've ever made news. And remember to make a change to the file banco.php. In this file data to inform access to the database. But now I need to leave the system running on my machine and online. I'll have a problem: The file banco.php on my machine will be different from banco.php file that will be online. As I have had many problems with that, I always half-workaround.

In this half-workaround we use a super-global called $ _SERVER. This is a super-global array containing different information.

We will use the option 'HTTP_HOST'. This option returns the domain name that the script is running. Run the following script into your browser:

Read the rest of this entry »

Mini course in PHP (Part 12 - 'INSERT and SELECT') - MySQL in PHP


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (9 votes, average: 4.89 out of 5)
Loading ... Loading ...

Hey everybody!

It took but left.

Today we will learn how to make a record in MySQL and how to retrieve the data. Try to be as brief as possible.

Shall we?

Read the rest of this entry »

Mini course in PHP (11 Part III) - MySQL in PHP


1 Estrelas2 Estrelas3 Estrelas4 Estrelas5 Estrelas (3 votes, average: 5.00 out of 5)
Loading ... Loading ...

Speaking staff, we will continue the Mini-Course? We still have much work ahead!

Well, last class we saw how the Mysql and creating tables via PhpMyAdmin. I'll write this post assuming that there were doubts about the PhpMyAdmin ok? For no one posted anything (doubt) in the comments!

The purpose of this lesson is to make our site / system connect to Mysql.
You've heard the saying: "One thing is one thing, another thing is another thing."? So, that saying applies perfectly.

PHP is one thing, MySQL is another!

Read the rest of this entry »

Get Adobe Flash player Plugin by wpburn.com wordpress themes