Automate update query in php mysql - Tool DataUpdater - SpartaCode

SpartaCode

Make your development faster and easier !

Automate update query in php mysql - Tool DataUpdater



Why ? DataUpdater ?

When you want to update a row in database.
For example, Consider your app or web has a User Profile Page and user can edit it when ever he wants.

In this case we will require php service to update specific record in database and if an extra column needs to be updated in future then we need to change our php service as well.

But using DataUpdater we can update columns dynamically without worrying about code.

So,

Lets use DataUpdater

DataUpdater accepts a unique primary key in your table and columns to update as input and updates that specific row. 


After successful execution of DataUpdater it will return status as output in JSON Array of Object format .


Download DataUpdater.php



How to use DataUpdater.php ?
Steps :


1. Just supply your database details into DataUpdater.php and copy DataUpdater.php into your xampp project.


2. Now DataUpdater is ready to run.


3. Now go to your Chrome browser in url section type following


http://localhost/YourProjectName/DataUpdater.php?table=YourTableName&KeyName=PrimaryKeyName&KeyValue=PrimaryKeyValue&ColumnName1=ColumnValue1&ColumnName2=ColumnValue2

Where,

ColumnName1,ColumnName2,..

Denotes column name to be updated in your table.

ColumnValue1, ColumnValue2,

Denotes Values that need to be assigned to specific column in table.


Note: 

There is no limit for ColumnName and Values you can update N number of Columns using DataUpdater.

Replace YourTableName with any table name in your database.

Replace YourProjectName with your project name or folder name.


Thank You
+1 Post and Comment

No comments:

Post a Comment

Get Amazing Traffic to your Site

Traffic Exchange

Post Bottom Ad

Responsive Ads Here