How to insert google addsese into MySQL database using PHP mysql - php

I want to insert Google Addsense code into Mysql database using php mysql in the live Linux server. But its not inserted, actually Google Addsense code inserted into my local Mysql database in my local system, but not in the server. Since Google Addsense code is a javascript code, may be due to this its not inserted(Normal data inserted), please help me how to insert such type of data into database.

Addsense code inserted into my local Mysql database in my local
system, but not in the server
Looks like you connected to database on your local machine instead of wanted server.
Acording to http://php.net/manual/en/function.mysql-connect.php
mysql_connect('<<<IP ADDDRESS TO YOUR SERVER>>>', '<<<USERNAME>>>', '<<<PASSWORD>>>');

Related

How to Synchronize mysql database to update from localhost to online server

I'm trying to make an Application that Runs in Localhost.
In the end of the day, I need to update my online database by data from my local database and I have NO idea how to do that.
can anyone tell me how to do that...?
I'm using codeigniter to make this app.
First, You should know How to Connect to the MySQL Database Remotely and How to allow remote connection to mysql than you can use syncr to synchronize your mysql databases

MySQL Workbench with Heroku

I have made an application with CodeIgniter with a MySQL database. I'm using Heroku to deploy my application, and have done so successfully. However, I'm having problems with using my database on Heroku. Locally I'm using XAMPP and phpmyadmin for all database work.
In Heroku, I've used a clearDB add on to support MySQL and have gotten all necessary credentials in the format:
mysql://DB_USERNAME:DB_PASSWORD#BD_HOST/DB_DATABASE?reconnect=true
I've used MySQL Workbench and have created a database using the above supplied host name, username, password and have successfully imported the tables, columns and data from my already existing database.
Now, I'm unsure on how to proceed. Do I export my database from Workbench? or what am I supposed to do to be able to use my database on Heroku.
Any and all help appreciated. Thanks.
P.S. please don't tell me to use Postgres
Update: So I figued I didn't have to do anything, once the databse is configured on Workbench, all I had to do was refresh my heroku web page and it works.

Connecting to an oracle database using web service

I have an android application that should connect to a database to retrieve some data to be shown on the screen.
The only method I know is to connect to mySQL using local host.
But how to connect to a real oracle database using the web service which is written in PHP.
Please help me since I didn't find any related information like this.
This is works for me in past, I hope its works for you too.
http://www.codeproject.com/Articles/112381/Step-by-Step-Method-to-Access-Webservice-from-Andr
http://www.c-sharpcorner.com/uploadfile/88b6e5/how-to-call-web-service-in-android-using-soap/

Azure with ClearDB

I have a php project that is connected to a ClearDB database. Running it locally has no issues and is able to interact with the database. But when I push the project to azure and try to run it from the website, it does not work with the database correctly. It seems to be able to connect to the database but inserts almost blank rows. For example, when I try to "register" it creates a row in the Users table with an ID but the name, username, etc. is all blank. I have no idea what is causing this. Are there any settings I have to change in Azure for it to be able to use that database or anything?
Thanks!

Updating a Google Cloud SQL Database instance

I have a deployed Cloud SQL Database instance running right now and it works fine. I am able to access and use it via my PHP Google App Engine app. I also have a local SQL Database for development.
Locally, I have made some changes to the structure of the database (added new columns) and would like to push those changes to the deployed app.
When I try to do this via the documented method on the App Engine site, I get an error saying the import failed for an unknown reason.
I am using a .sql dump made by PhpMyAdmin and have done this successfully for the initial import. I made sure to include USE DATABASE NAME in the dump.
Any ideas as to why it's failing? What is the best way to update a Cloud SQL Database? Thanks a lot!
An easy way is to request an IP, whitelist the IP you are connecting from (link) and use the MySQL client (link). Over IP you can also use GUI tools like MySQL Workbench, Toad, SQuirrel SQL and others (link).
You can set up phpMyAdmin as a different version of your application using the instructions here: https://gae-php-tips.appspot.com/2013/05/26/setting-up-phpmyadmin-on-app-engine/ That would probably be the easiest way of updating a Cloud SQL database...

Categories