Skip to content

Instantly share code, notes, and snippets.

View brunotdantas's full-sized avatar
🏠
Working from home

Bruno Dantas brunotdantas

🏠
Working from home
View GitHub Profile
@brunotdantas
brunotdantas / estados-cidades.json
Created March 3, 2022 02:08 — forked from letanure/estados-cidades.json
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@brunotdantas
brunotdantas / MSSQL_RepetitiveReplace_fn.sql
Created January 28, 2022 14:59 — forked from jkdba/MSSQL_RepetitiveReplace_fn.sql
Simple function to recursively replace a pattern in a string.
CREATE FUNCTION dbo.RepetitiveReplace_fn
(
@P_String VARCHAR(MAX),
@P_Pattern VARCHAR(MAX),
@P_ReplaceString VARCHAR(MAX),
@P_ReplaceLength INT = 1
)
RETURNS VARCHAR(MAX)
BEGIN
DECLARE @Index INT;
<?php
/***********************************************************
MYSQL VERSION
************************************************************/
$username="root"; $password=""; $database="exam_codes";
$con = mysql_connect("localhost",$username,$password) or die( "Unable to Connect database");
mysql_select_db($database,$con) or die( "Unable to select database");
// Table Name that you want
// to export in csv