LOCATE() – MySQL Function

MySQL Function

LOCATE() – MySQL Function The LOCATE() function returns the position of the first occurrence of a substring in a string. If the substring is not found within the original string, this function returns 0. This function performs a case-insensitive search. LOCATE(substring, string, start) Parameter Description substring Required. The substring to search for in string string … Read more

time_to_sec MySQL function

MySQL Function

time_to_sec MySQL function The TIME_TO_SEC() function converts a time value into seconds. SELECT TIME_TO_SEC(“19:30:10”); Output: 70210 SELECT TIME_TO_SEC(“-03:30:00”); Output: -12600 PHP MySQL Program example of time_to_sec <!doctype html> <html lang=”en”> <head> <meta charset=”utf-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <title>example-time_to_sec-function – php mysql examples | w3resource</title> <meta name=”description” content=”PHP MySQL PDO Example”> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css”> </head> <body> … Read more

CONCAT() Function – MySQL

MySQL Function

CONCAT() Function – MySQL MySQL has the CONCAT() function, which allows you to concatenate two or more strings. The function actually allows for one or more arguments, but its main use is to concatenate two or more strings. CONCAT (string1, string2,…) Arguments string1 First string to be joined. string2 Second string to be joined. Up … Read more

TIMEDIFF – MySQL Function

MySQL Function

TIMEDIFF – MySQL Function This returns the difference between two datetime expressions: For example: SELECT TIMEDIFF(“2020-05-10 13:10:11”, “2020-05-05 13:10:10”); Output: 120:00:01 Let’s Understand the few things about timediff function The TIMEDIFF() function returns the difference between two time/datetime expressions. time1 and time2 should be in the same format, and the calculation is time1 – time2. … Read more

My first web page – html introduction

html index

My first web page – html introduction HTML is the standard markup language to create Web page. HTML stands for Hyper Text Markup Language HTML describes the structure of a Web page HTML consists of a series of elements HTML elements tell the browser how to display the content HTML elements are represented by tags … Read more

Shell Script Example – Linux

linux

Shell Script Example – Linux for ((j=12;j<=31;j++)); do echo $j year=2020 month=01 day=$j mkdir /mnt/recording/final/11/$year-$month-$day results=($(mysql –user name -ppassword -h 192.168.2.4 db -Bse “SELECT id FROM calldetails  WHERE calldate BETWEEN ‘$year-$month-$day 00:00:00’ AND ‘$year-$month-$day 23:00:00′”)) cnt=${#results[@]} for (( i=0 ; i<cnt ; i++ )) do a=${results[$i]} echo auid=$a; cp /home/data/$year-$month-$day/$a.gsm /mnt/recording/final/11/$year-$month-$day/$a.gsm done done