PHP insert update, delete using PDO part-2
Part-2: Create a MySQL Database and a table using PDO.
In part two, I am going to create a setupdb.php file where I do following task.
1. Database connection in PHP and MySQL using PDO,2. Create database in MySQL which name we define in config.php
3. Create table in MySQL using PDO
4. Insert sample records using prepared statements.
PHP insert update, delete using PDO part-1
Part-1: Configure and Setup the MySQL database connection using PDO.
In this example, I am going to create separate files for each database operations which require to do database connection. In part one, I define few constant that is going to use throw-out the application in config.php and conn.php where I define the $conn connection object.config.php
<?php
define("servername","localhost");
define("username","root");
define("password","admin");
define("mydb","bsrdb");
?>
PHP PDO : insert, update delete example for beginners
Creating a web application using PHP (Hyper Text Preprocessor) and PDO (PHP Data Object). Here in this article I am exploring the latest feature of PHP to do better deal with databases. Yes, it’s PDO. After the many feature of MySQL function are improved or depreciated the MySQLi (MySQL improved) introduce. Still MySQLi is doing well but problem is you can connect to only one database using it that is MySQL. To improvise the better database connectivity option for most popular web server side scripting language PHP. PHP introduce PHP data object (PDO). So, Question is -,
What is this PDO?
PDO is PHP data object which provide the data access layer. PDO have uniform and most powerful API methods to access multiple web databases using PHP.
Android Phone Call Example
Definition: Create an application to call specific entered number by user in the EditText
Ex14.java
package bsr.exa;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
Read SMS in Android
Definition: Read messages from the mobile and display it on the screen
E13Activity.java
package bsr.exa;
import android.app.Activity;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.widget.TextView;
import android.app.Activity;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.widget.TextView;
Subscribe to:
Posts (Atom)
Subjects
- WordPress
- Mobile Computing-4649303 Practical Solution
- Android Programming New Syllabus Theory
- PHP LAMP Question Bank
- PHP LAMP Theory
- Step by Step Android Example
- Android Practical
- Android Theory
- Android Question Bank
- Networking FON Practical
- Networking FON Theory
- OS Practical
- OS Theory
- HTML
- JavaScript
- J2EE WTAD Theory
- J2EE WTAD Question Bank
- J2EE WTAD Quick Guide
- J2EE WTAD GTU Papers
- J2EE WTAD Practical
- Python
- JAVA Theory
- JAVA Practical
- MIS
Categories
- Android (55)
- CSS (3)
- Configure Tomcat7 (2)
- Decryption (16)
- Difference (1)
- Encryption (16)
- Error Detection and Correction Techniques (3)
- FON (27)
- Framing Technic (2)
- J2EE (29)
- JAVA (13)
- JavaScript (19)
- OS (17)
- PHP (11)
- Protocol (3)
- SERVER SOCKET PROGRAMING (7)
- Servlet (13)
- WTAD (34)
- c (11)
- install Tomcat (2)
- linux (8)
- shell script (33)
- unix (22)
Total Pageviews
© BipinRupadiya.com. Powered by Blogger.