postheadericon 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");
?>

postheadericon 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.

postheadericon 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;

postheadericon 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;

postheadericon GTU WTAD Old Question Paper


Total Pageviews

© BipinRupadiya.com. Powered by Blogger.