Skip to main content

Posts

Create notification,store and retrive a particular user.

Notification Data table is: as per user defined functionality , user want notification as per particular any user send. if you want particular notification please follow following database structure : Normally we can use following data table structure INNODB database use because mostly common used that, its very fast loading and primary and forgen key assign. Free Teachnology provide free php tutorial as well as MySql,javascript,jquery knowlege : above image show that basic notification table structure pk_id is primary key of notification table , fk_uid is forgin key of user table of particular user primary key, Following code is create notification table : -- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 07, 2018 at 12:16 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 5.6.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `makeathome` -- -...

Find points(latitude/longitude) within a distance using MySQL

Free Teachnology provide free php,mysql,jquery,javascript, MySQL - when you calculate distance between latitude/longitude its simple way : Step : 1  create table as per your requirement and two column  latitude/longitude with data type Double Range On a client project recently, we had to make it easy to filter database query results based on the distance between a user and an entity in our database. It's easy to get overwhelmed in that context, worrying about the crazy amount of PHP calculations you're going to have to run. MySQL can do that! If you need to calculate this, you can actually get far by just using MySQL! MySQL 5.7 introduced latitude, which is a native function to calculate the distance between two points. That’s an interesting start but it doesn’t apply with Geography since the distance between lines of latitude and longitude are not an equal distance apart. As you get closer to the equator, lines of latitude get further apart. If you u...

MySQL –TIMESTAMP or DATETIME difference

MySQL - When to Use TIMESTAMP or DATETIME - Difference Between TIMESTAMP or DATETIME clocktimeimage This is a one of the most popular question, I often receive when MySQL Developers are creating a database. There are multiple datatypes which can store DateTime datatype in MySQL. Range The supported range for DATETIME type is ‘ 1000-01-01 00:00:00 ’ to ‘ 9999-12-31 23:59:59 ’. The supported range for TIMESTAMP type is ‘ 1970-01-01 00:00:01 ’ UTC to ‘ 2038-01-19 03:14:07 ’ UTC . That means if you want to store date which is before the year 1970 or after the year 2038 you will need to use DATETIME . Conversion As per the MySQL official documentation – MySQL converts TIMESTAMP values from the current time zone to UTC for storage, and back from UTC to the current time zone for retrieval. This means, if your application is such where you want time to stay absolutely steady with respect to GMT, you must use TIMESTAMP, or else you should use it with DATETIME. For example, if I am...

Profile Share Fixing the Thumbnail Image, Title and Description for Shared Links

Profile Share Fixing the Thumbnail Image, Title and Description for Shared Links user want to share any information then use following code  and read step by step Profile Share Fixing the Thumbnail Image, Title and Description for Shared Links if you want share profile on following social link : 1-Facebook 2-twitter.com 3-LinkedIn 4-google +, Code link : https://drive.google.com/open?id=1IzTZZh_0euDqFSHL_vPRiQePlNTw3h-q Demo link : http://freeteachnology.hol.es/socialshare/ To modify a page's thumbnail image, description, and additional metadata for these services, you can provide meta tags in the HTML code of the page.Implementing Open Graph Meta Tags You can implement meta tags in a number of ways. In content management systems might  be allow you to modify a page's meta tags , then use following code in meta section of your project code, <link href="bootstrap.min.css" rel="stylesheet"> <link href="bootstrap-tour.m...

PHP 7 is the most awaited and is a major feature release of PHP programming language

PHP 7 PHP 7 is the most awaited and is a major feature release of PHP programming language. PHP 7 was released on 3rd Dec 2015. This tutorial will teach you the new features of PHP 7 and their usage in a simple and intuitive way. Audience This tutorial has been prepared for PHP developers from a beginner’s point of view. After completing this tutorial, you will find yourself at a moderate level of expertise in the knowledge of PHP from where you can take yourself to next levels. Prerequisites We assume that you already know about the older versions of PHP and now you can start learning the new features of PHP 7. Execute PHP-7 Online For most of the examples given in this tutorial, you will find an option Try it. Just use this option to execute your PHP-7 programs at the spot and enjoy your learning. What is PHP 7? PHP 7 is a major release of PHP programming language and is touted to be a revolution in the way web applications can be developed and delivered for mobile...

Swap Two number Program in PHP

Swap Two number Program in PHP Swap two number with each other means interchange their value. Suppose you have two number a and b a contain 6 and b contain value 5 after swap their value, a have 5 and b have 6. basically 2 method of interchange value a-using third variable, b-without using third variable(Using Arithmetic Operators), c-usign multiplication, d-bitwaise XOR operation, a-swap two number using third <?php $a=10; $b=20; echo "Value of a: $a</br>"; echo "Value of b: $b</br>"; $a=$a+$b; $b=$a-$b; $a=$a-$b; echo "Value of a: $a</br>"; echo "Value of b: $b</br>"; ?> b-without using third variable(Using Arithmetic Operators), wap two number with each other means interchange their value. Suppose you have two number a and b a contain 10 and b contain value 20 after swap their value, a have 20 and b have 10. <?php $a=10; $b=20; echo "Value of a: $a</b...

Myisam and innodb main defference

Hi Dear all, Myisam and innodb main defference that as following : So these are the main differences between these two engines. You can specify in the query that which engine is to be used while creating the table. CREATE TABLE test name varchar(30) ENGINE = InnoDB; Since MyISAM To check the engines of already existing tables, use the following query. It will list all the existing tables which are present in the current database, with their engines specified. show table status; If you want to view the status of a particular table, then use the following query, show table status where Name = ‘tablename’; MYISAM: MYISAM supports Table-level Locking MyISAM designed for need of speed MyISAM does not support foreign keys hence we call MySQL with MYISAM is DBMS MyISAM stores its tables, data and indexes in diskspace using separate three different files. (tablename.FRM, tablename.MYD, tablename.MYI) MYISAM not supports transaction. You cannot commit and rollback wit...