The ‘ date’ column, is to store the date and time the todo was created, so the type will be ‘ DATETIME’. The ‘todoDescription’ this table describes the todo, it is also a string so we have to change the type to ‘text’, note that ‘TEXT’ is used to store strings that are intended to be more than 255 characters, e.g newspaper stories. You have to specify the limit of character that the varchar can hold under the ‘ length/limits’ field, so here I use ‘ 200’. The ‘ todoTitle’ is the title of our todo, it is a string so we have to change the type to ‘ varchar’, note that varchar can only between 0–255’ characters so you can only use it when storing a string that is not intended to be more than 255 characters. Id is an identifier to identify each row of a table. Open your browser, and type ‘localhost/phpmyadmin’ you should see something like this Please refer to the part first episode of this tutorial for the configuration process DATABASEīefore you can build a CRUD app with PHP you need a database, in this tutorial we will make use of MySQL database. Basically, this four processes are what you want in most of your dynamics applications, so you see how important it is to learn these fantastic four. An illustration is when you want to post a story on facebook, you click on ‘post’ then the server process it, that is the Creating part, then you see the story you just posted on your facebook timeline, that’s the reading or retrieving part, and let’s assume you made a mistake while typing the story, you click on ‘edit post’ and then you edit the story and update it, that’s the updating part and after that, you received a lot of bad comments on the story and that got you mad, so you click on remove post and that is the deleting part. Before we start off, CRUD means C-Create, R-Read or Retrieve, U-Update, D-Delete. If you are totally new to PHP I will recommend that you take the episode #1 of this tutorial, so that you can easily follow along. Hi guys, in this tutorial I will be teaching you how to do CRUD in PHP by building a simple todo-list web application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |