Welcome To Snipplr


Everyone's Recent Snippets Tagged query



« Prev 1 2 3 4 5
  1. FAV

    How to use "IN" Query in Laravel ?

    In Laravel you can use "IN" query as Using Eloquent $data = YourModel::whereIn('id', array(1, 2, 3))->get(); Using DB Query builder $data = DB::table('your_table')->whereIn('id', array(1, 2, 3))->get();
    PHP 17 views posted 5 months ago by interviewqueries
  2. 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 2 views posted 3 years ago by rm1984
  3. FAV

    CSS: Media Query

    This is code you put in a CSS file. It queries the size of the screen using the parameters passed in. If its true, it then applies the CSS
    CSS 3 views posted 4 years ago by heathbo
  4. FAV

    Sample Media Query in html Header

    Unlike linked style sheets, it is necessary to enclose CSS in Headers in a "style type". This example media query is for screens under 1024 (tablets and phones) to make sure the images do not extend beyond the layout.
    CSS 3 views posted 5 years ago by jefferis
  5. FAV

    Query output into multiple columns

    coldfusion snippet to output a query recordset into multiple columns
    ColdFusion saved by 1 person 1 views posted 5 years ago by dreamstarter
  6. FAV

    fast and easy way of parsing query strings in JavaScript

    Now make a request to page.html?x=Hello: console.log(getQueryVariable('x'));
    CSS 3 views posted 5 years ago by buda9
  7. FAV

    Media Queries (for Responsive Web Design)

    A couple of useful media queries...
    CSS saved by 2 people 14 views posted 6 years ago by iroybot
  8. FAV

    JPA NonFlushableQueryWrapper

    Wrapper over JPA query that avoid flush
    Java 1 views posted 6 years ago by pachaman
  9. FAV

    Viewing Trigger Order (First and Last)

    This SQL statesment help you to understand which trigger is going to execute first and which one is going to execute last.
    SQL 2 views posted 6 years ago by edwinet
  10. FAV

    PostgreSQL wildcard search for any of a list of words

    PostgreSQL wildcard search for any of a list of words, returns true or false depending on whether its pattern matches the given string.
    SQL 2 views posted 6 years ago by alecolucci
  11. FAV

    Auditing SQL Server User and Role Permissions for Databases

    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 (...
    SQL 4 views posted 6 years ago by edwinet
  12. FAV

    [JAVASCRIPT] Get Parameter from url query string

    Get Parameter from url query string
    JavaScript 7 views posted 7 years ago by goo
  13. FAV

    CSS: Retina display media query

    I needed a quick way to target high-resolution graphics. Here was my final solution
    CSS 7 views posted 7 years ago by chrisaiv
  14. FAV

    Get Whois Information.

    If you need to get the whois information for a specific domain, why not using PHP to do it? The following function take a domain name as a parameter, and then display the whois info related to the domain.
    PHP saved by 2 people 9 views posted 7 years ago by o0110o
  15. FAV

    Theme media queries

    Our theme's range of media queries
    CSS 8 views posted 7 years ago by vanseijen
  16. FAV

    Blank HTML template with hosted src, viewport & respond.js

    Blank HTML template with minimal hosted srcs and respond.js
    HTML 9 views posted 7 years ago by jerryhdev
  17. FAV

    Query posts and cache the query

    Snippet to show a simple use of the transient API when querying posts.
    PHP 4 views posted 7 years ago by Mat_
  18. FAV

    MySQL - Simulate MySQL Queries

    You could start a transaction before running your queries and then rollback after running them. Note that to do this you'll require InnoDB or XtraDb tables (won't work on MyISAM).
    MySQL 12 views posted 7 years ago by satie83
  19. FAV

    Prevent sql injection in LIKE queries

    Function to prevent sql injection in Like queries, where the characters '_' and '%' can be dangerous.
    PHP 11 views posted 7 years ago by TimoZachi
  20. FAV

    Uri multiple parameters

    This function allow you ti have multiple parameters in your query string. Ex : id=12&name=Doe&id=42&nickname=Monster
    PHP 4 views posted 7 years ago by MonsterDev
  21. FAV

    MySQL INSERT Query Generator w/ Strings

    Takes your table name and key=>value array of values and returns the text for inserting into a MySQL database. Automatically surrounds strings with single quotes.
    PHP saved by 3 people 10 views posted 7 years ago by lemcoe9
  22. FAV

    db2 connect and query

    Connect to and query a db2 database using php.
    PHP 8 views posted 7 years ago by zombree
  23. FAV

    .NET - LINQ - C# - Basics - Examples - The Three Parts of a LINQ Query

    Snippet to illustrate the three actions that happen in all LINQ query operations.
    C# 3 views posted 7 years ago by denakitan
  24. FAV

    Run MySQL query

    PHP saved by 5 people 12 views posted 7 years ago by paul0078
  25. FAV

    Get Query String Args Javascript

    This will get the arguments on the query string and put them into a handy array.
    JavaScript 4 views posted 8 years ago by brownrl
  26. FAV

    if mysql_query is not empty

    SQL 1 views posted 8 years ago by cesarkohl
  27. FAV

    Pass variables into javascript via query strings

    Pass variables into javascript files using query strings, and return them using getJSvars() Example //HTML <script> //return the value of "foo" getJSvars('filename.js', 'foo');
    JavaScript 1 views posted 8 years ago by DenoteIt
  28. FAV

    Parse a query string into an object

    JavaScript 3 views posted 8 years ago by ddavidd
  29. FAV

    JavaScript in XSLT template

    XSLT 0 views posted 8 years ago by nickaranz
  30. FAV

    Robots.txt - Disallow Certain Query String

    Other 0 views posted 8 years ago by batfan
« Prev 1 2 3 4 5