Stack of codes.
Please comment below your opinion. We will try to improve and bring more accurate contents for you.

Friday, 21 September 2018

How to Update the Current Browser URL

How to Update the Current Browser URL

# UPDATE THE CURRENT URL IN BROWSER::

<script>

ChangeUrl = function(page, url) {

    if (typeof (history.pushState) != "undefined") {

        var obj = { Page: page, Url: url };

        history.pushState(obj, obj.Page, obj.Url);

        $('.breadcrumb-get-a-pro').attr('href', url);

    } else {

        alert("Browser does not support HTML5.");

    }

}

</script>

Sunday, 16 September 2018

SQL update from one Table to another based on a ID match


SQL update from one Table to another based on a ID match


SQL update from one Table to another based on a ID match

MS SQL

UPDATE
 Sales_Import
SET
 Sales_Import.AccountNumber = RAN.AccountNumber
FROM
 Sales_Import SI
INNER JOIN
 RetrieveAccountNumber RAN
ON
 SI.LeadID = RAN.LeadID;
MySQL and MariaDB

UPDATE
 Sales_Import SI,
 RetrieveAccountNumber RAN
SET
 SI.AccountNumber = RAN.AccountNumber
WHERE
 SI.LeadID = RAN.LeadID;



http://www.stackofcodes.in/2017/12/05/sql-update-one-table-another-based-id-match/

Wednesday, 5 September 2018

Disable ONLY_FULL_GROUP_BY

Disable ONLY_FULL_GROUP_BY

Disable ONLY_FULL_GROUP_BY



Solution 1: Remove ONLY_FULL_GROUP_BY from mysql console
mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Solution 2: Remove ONLY_FULL_GROUP_BY from phpmyadmin
– Open phpmyadmin & select localhost
– Click on menu Variables & scroll down for sql mode
– Click on edit button to change the values & remove ONLY_FULL_GROUP_BY & click on save







To keep your current mysql settings and
disable ONLY_FULL_GROUP_BY
I suggest to visit your phpmyadmin or whatever client you are using and type:
SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')  copy_me

next copy result to your my.ini file.
For mint:
sudo nano /etc/mysql/my.cnf
For ubuntu 16 and up:
sudo nano /etc/mysql/my.cnf
For ubuntu 14-16:
/etc/mysql/mysql.conf.d/mysqld.cnf


Source:
https://www.stackofcodes.in/2018/09/04/disable-only_full_group_by/


How to get the Last Inserted ID in Table in Cakephp?

How to get the Last Inserted ID in Table in Cakephp?

Here, ModelName is your table model name.
Just Call this after the Insert SQL in the Cakephp.
$last_inserted_id=$this->ModelName->getLastInsertId()

Google Finance Price Conversion API NOT Working

Google Finance Price Conversion API NOT Working


http://www.stackofcodes.in/2018/09/04/google-finance-price-conversion-api-not-working/

Currency Conversion Rates Using API

This API is working. It is returning the Conversion Rate between the Currencies.

This Link I have tested , It is working,.
The API link is,
Option-1:
http://free.currencyconverterapi.com/api/v5/convert?q=EUR_USD&compact=y
Output:
{"EUR_USD":{"val":1.162122}}
Option-2:
http://free.currencyconverterapi.com/api/v5/convert?q=EUR_USD&compact=n
Output:
{"query":{"count":1},"results":{"EUR_USD":{"id":"EUR_USD","val":1.162122,"to":"USD","fr":"EUR"}}}

Popular Posts

Stack Of Codes, stackofcodes, Stack your codes here, Open your coding for all, Php coding, Codeigniter, blogger, Stack of codes Developers, Php Framework, stackofcodes.in, best coding site, Stack the codes, place the code in stack, Stack of codes is the largest, most trusted online community for developers to learn and share their programming knowledge and build their carrers.

Labels

PHP CodeIgniter SQL Facebook HTML Connect mysqli Constructor Destructor Stack Of Codes Update SQL codeignitre delete files from folder Aadhaar Agent Align center image Alternative Control Structure Back Slash Browser Browser version CSS Calculate Date Difference in php Cannot modify header information Check image exists CodeIgniter get_where CodeIgniter-HMVC-3.1.6 Codeigniter 3.1.7 Connect and select database Constants Constructor and Destructor Convert stdClass object to array in PHP Copy Image from URL Date Calculator]php Date Difference Disable Window Update Documents exists Enable Window Update File exists Gas Linking with Aadhaar Get TinyMCE to use full image url instead of relative one Get all files from folder How to delete a file in php Image Corrupted Image Exists in php Ip address Jquery Checkbox check all Make slug in Javascript or Jquery Multiple Submit Buttons in a form Mysqli connect Only variable references should be returned by reference Open and Close html ul tag and close the ul on evry third block Phar Php Version For Codeigniter 3.0 Platform Read All files in Directory Reduce the image file size using PHP Rename Table Robots.txt Generator Robots.txt Generator - SEO Tools - SEObook Scraping Data Scraping Data From Website Scrollbar Design Select Checkbox Server Requirements For Codeigniter 3.1.6 Simple Carousel demo Slug Sub string in Php Substring TinyMCE URL Conversion Example TinyMCE settings to get image path correct UAC Warning in windows pro Unique Check Unique Check in Codeigniter Virtual hosts WSDL cache Win 8.1 with UAC Warning XAMPP to send mail from localhost Xampp apache - XAMPP installation best frameworks best javascript frameworks check if contains http:// in php clean url clear cache codeigniter $this->db->like is case sensitive data containing apostrophes deselect Checkbox all duplicate field entry escape_str every third block ul tag will close facebook Share facebook server foreach etc front Slash get_where in codeigniter hash_hmac headers already sent how to make robot.txt file for my website? htaccess http:// or https:// iS mobile if-else iv size for all mobile / tablet display javascript json_decode in array php looking for a job make url with hyphen media queries. mysql_real_escape_string mysqli real escapr string server down slug in Javascript some function of xamp is possible disabled sql - How to split a single column values to multiple column values tinymce image path showing as ../../ unlink File url contains http:// or https:// while window update