Welcome To Snipplr


Everyone's Recent Snippets Tagged sql



1 2 3 4 5 6 7 ... 17
This piece of sql is used to find the similarity of one item to other items based on a 3 table tag system, cities, cities_tags, tags. It works in sQlite and MySQL. Use this code to get the idea of how you would make a "item" has "related items" based...
0 1784 posted 11 years ago by brownrl
Bei Autocomplete aus größeren Datenbanken ist es sinnvoll, die Datenbankabfrage in eine separate php-Datei zu verlegen.
0 2000 posted 11 years ago by ulfinger
WE-Objekte ohne Umwege direkt aus php erstellen. Das ist vor allem dann sinnvoll, denn die Eingaben vorher geprüft und verarbeitet werden sollen oder wenn ein Eingabeformular über mehrere Seiten geht.
0 2929 posted 11 years ago by ulfinger
caching session variables in Mysql using memory engine for fast client response. note: please test before use, then use at your own risk.
0 3816 posted 11 years ago by prgrmmraben
Here you may find some useful snippets for calculating relative time for different purposes: to get info from a column within certain date, like the latest 7 days, to get time interval etc.
0 1977 posted 12 years ago by apphp-snippets
Data types and ranges for Microsoft Access, MySQL and SQL Server.
0 1541 posted 12 years ago by chrispantelis
New SQL Record = Populate TimeStamp Field with GetDate() Function
0 1905 posted 12 years ago by chrispantelis
If you want to make a copy of the table including all of the data, then leave out the WHERE clause.
0 1709 posted 12 years ago by chrispantelis
Parse xml (passed as a parameter) in SQL
0 2784 posted 12 years ago by rralhan
Drop store procedures
0 1888 posted 12 years ago by ironcrema
Función sql que devuelve una tabla. parametros ID, cadena, caracter_slit
0 1962 posted 12 years ago by ironcrema
Example: CREATE SCHEMA `db_wordpress_02` ; GRANT ALL PRIVILEGES ON db_wordpress_02.* to 'root'@'localhost' IDENTIFIED BY 'scr1ptlov3r';
1 1871 posted 12 years ago by ampt
Extrae subcadena de cadena separado por caracter
0 1679 posted 12 years ago by ironcrema
Agrega Llave Foránea
0 1629 posted 12 years ago by ironcrema
When using PDO with sQlite ->rowCount() doesn't work. the recommendation is to do a pre query to get the number. Thus, I created this snippet to help things along.
0 1741 posted 12 years ago by brownrl
Lets say you have a table with field called "tags" that consists from tags separated by commas and you want to check whether it includes a required tag. Here the simplest ways of doing that.
0 1953 posted 13 years ago by apphp-snippets
How to get a query based on case/when sintax, on WHERE statement (Treated as boolean expresion)
0 1547 posted 13 years ago by keidash
using this code in a stored procedure you can reset the seed of the identity column in sql server database
0 1848 posted 13 years ago by PalCoder
This SQL would help you to transpose a rows into columns in SQL
0 3419 posted 13 years ago by mprabhuram
How to get onlye the time in SQL
0 1707 posted 13 years ago by keidash
Bulk upload a CSV into Microsoft SQL Server
0 1925 posted 13 years ago by dego89
This SQL statesment help you to understand which trigger is going to execute first and which one is going to execute last.
0 2050 posted 13 years ago by edwinet
Sql table with country codes coordinates timezone utc utc-dst usefull if you want to have human friendly time zones like America/Los_Angeles
0 6685 posted 13 years ago by decahedronhotmailcom
Connecting to Oracle using Java JDBC
0 1701 posted 13 years ago by roizaig
Run these queries (phpMyAdmin will do) to delete all media in the library, and remove all post attachment affiliation
1 4194 posted 13 years ago by rickygri
Here the simplest way of selecting random rows from the MySQL database with using "ORDER BY RAND()" clause in the query.
0 4257 posted 13 years ago by apphp-snippets
http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins
0 1648 posted 13 years ago by hairajeshk
The sysprotects system table reports all of the permissions granted or denied in a given database. We'll need to join it with sysusers and sysobjects to get all the information we need. Here's an example query that only pulls information on objects (...
0 2187 posted 13 years ago by edwinet
It removes relations before deleting tables.
0 1742 posted 13 years ago by fixpq
Olá Pessoal, Neste artigo vou falar sobre Database Mirror, uma nova funcionalidade do SQL Server 2005 para alta disponibilidade.Database Mirror consiste em basicamente um espelhamento de um banco de dados, uma solução que fornece quase em tempo r...
0 1270 posted 13 years ago by colonia
1 2 3 4 5 6 7 ... 17