Welcome To Snipplr


Everyone's Recent Snippets Tagged mysql



« Prev 1 2 3 4 5 ... 20
  1. FAV

    MySql workbench add created and modified columns for CAKEPHP

    Name this script whatever you want, and run it via Workbench Scripting shell
    Python 4 views posted 2 years ago by acosonic
  2. FAV

    Connect To A MySQL Database

    This code snippet shows how to connect to a MySQL database using Connector/J.
    Java 10 views posted 2 years ago by syedhussim
  3. FAV

    Get Random Record Based on Weight

    This snippet allows you to get random record from given table by weight. To run it, it must have a field named "weight". The more "weight" is assigned, the more often the record is selected. The value of "weight" should be an integer between 1 and 10...
    MySQL 6 views posted 2 years ago by apphp-snippets
  4. FAV

    Insert or Update Record if Unique Key Already Exists

    This snippet allows you to insert new record into table. In case a unique key already exists - it updates appropriate fields only, leaving other fields untouched.
    SQL 4 views posted 2 years ago by apphp-snippets
  5. FAV

    Configuration Mysql 5.7

    Some configurations for mysql 5.7
    MySQL 4 views posted 2 years ago by ironcrema
  6. FAV

    Show the output of a query in a more readable vertical format

    Show the output of a query in a more readable vertical format
    MySQL 4 views posted 3 years ago by rm1984
  7. FAV

    mysql pivot data

    pivot data. input source query in the form : +--------+-----------+-------------+-------------+ | name | pivot_fid | pivot_fname | pivot_value | +--------+-----------+-------------+-------------+ | apple | 1 | is red...
    SQL 3 views posted 4 years ago by ktrout
  8. FAV

    mysql procedure throw_error

    procedure to throw application defined error
    SQL 3 views posted 4 years ago by ktrout
  9. FAV

    mysql rank with ties

    calculate rank ( with ties ) over points table
    SQL 2 views posted 4 years ago by ktrout
  10. FAV

    mysql clone table with structure and indexes

    clone table with structure and indexes
    SQL 3 views posted 4 years ago by ktrout
  11. FAV

    mysql unroll variable length string list

    unroll variable length string list to normalised form.
    SQL 5 views posted 4 years ago by ktrout
  12. FAV

    mysql tablename search information schema

    search for tables in mysql catalog ( information_schema )
    SQL 2 views posted 4 years ago by ktrout
  13. FAV

    mysql batch sql statements

    stored procedure for executing batch sql statements
    SQL 2 views posted 4 years ago by ktrout
  14. FAV

    mysql calendar table

    creates a minimal calendar table
    SQL 3 views posted 4 years ago by ktrout
  15. FAV

    mysql sequence generator ( decimal definition )

    one cross join for each ai in definition of decimal number as sum(ai*10^i)
    SQL 2 views posted 4 years ago by ktrout
  16. FAV

    php code example

    example of php code I worked on
    PHP 5 views posted 4 years ago by johnschneider
  17. FAV

    PHP - Doctrine - Left join ON condition AND other condition syntax in Doctrine

    In SQL I can get this by adding AND to the join LEFT JOIN installations i ON a.id = i.app AND i.page = :page This way I get the installation info for an app that has an installation on the page, but I get null values on the columns for app's that...
    PHP 7 views posted 4 years ago by satie83
  18. FAV

    VB.NET SQL Example: How to send SMS in VB.NET using SQL database

    I thought I share this code snippet because I find this way of SMS sending an easy solution. I believe that even beginners can implement this VB.NET SQL SMS application, but I think some extent of perfection in the SMS technology is required for bett...
    VB.NET 14 views posted 4 years ago by LoganTurn
  19. FAV

    Simple PDO Connection and select

    This is the basic code that you need to know to connect and list data with PDO. Don't use de old method (mysql_connect and mysqli_connect) to connect and interact with databases.
    PHP 12 views posted 4 years ago by snstro
  20. FAV

    IP Address (IPv6) Lookup in Bulk Using PHP and MySQL Database

    The code below can be used to lookup IP address in bulk in return of geolocation information using PHP programming languages and MySQL database. In this tutorial, we use the IP2Location LITE database to lookup country of origin from the visitor's IP...
    PHP saved by 3 people 5 views posted 5 years ago by Hexahow
  21. FAV

    Scraped item to mysql in scrapy

    To store you item into mysql database. 1. I say you have been have mysql database and the table what field is the same in item class that you wang to be stored 2. I just ensure you item insert into mysql, do not ensure the performance 3. To...
    Python 19 views posted 5 years ago by zwidnypublic
  22. FAV

    A example option file for mysql in windows

    `mysql-dev.ini` can be used in a developing environment and put it in the Mysql Home dir
    MySQL 3 views posted 5 years ago by jacktan
  23. FAV

    A windows batch to run Mysql client

    **Vars** to to specify + ${EnvSet_Bash} **Demo** vars specified like + ${EnvSet_Bash}=[set-mysqlRT-Env](http://www.snipplr.com/view/80407/an-example-bash-file-for-set-temporary-path/ "set-mysqlRT-Env.bat") pluss other bash commond *...
    DOS Batch 6 views posted 5 years ago by jacktan
  24. FAV

    A windows batch to shutdown Mysql server

    Run `mysqladmin` to shutdown msyql server with a specified option file. **Vars** to to specify + ${EnvSet_Bash} **Demo** vars specified like + ${EnvSet_Bash}=[set-mysqlRT-Env](http://www.snipplr.com/view/80407/an-example-bash-file-for-...
    DOS Batch 5 views posted 5 years ago by jacktan
  25. FAV

    A windows batch to run Mysql server

    Run a Mysql server using command line with a specified option file. **Vars** to to specify + ${EnvSet_Bash} **Demo** vars specified like + ${EnvSet_Bash}=[set-mysqlRT-Env](http://www.snipplr.com/view/80407/an-example-bash-file-for-set-...
    DOS Batch 3 views posted 5 years ago by jacktan
  26. FAV

    webEdition-Objekt mit php erstellen

    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.
    PHP 4 views posted 5 years ago by ulfinger
  27. FAV

    Map Mysql tables to java beans, by a one class

    DBHelper can retrieve Mysql tables into java objects, without any external libraries or a mapping configuration file. note: please test before use, then use at your own risk.
    Java 11 views posted 5 years ago by prgrmmraben
  28. FAV

    Mysql find duplicate values in field

    Mysql find duplicate values in field
    MySQL 5 views posted 5 years ago by flatearthcomms
  29. FAV

    A light implementation of Session table in Mysql 5.6 using memory engine

    caching session variables in Mysql using memory engine for fast client response. note: please test before use, then use at your own risk.
    SQL 6 views posted 5 years ago by prgrmmraben
  30. FAV

    Delete from table with limit (mySQL)

    Delete from table with limit (mySQL)
    MySQL 4 views posted 5 years ago by Kcko
« Prev 1 2 3 4 5 ... 20