Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged mysql



« Prev 1 2 3 4 5 6 7
example of php code I worked on
0 2199 posted 10 years ago by johnschneider
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...
0 4113 posted 10 years ago by satie83
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.
0 2302 posted 10 years ago by snstro
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...
1 2729 posted 10 years ago by Hexahow
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 2029 posted 10 years ago by ulfinger
Format a mysql datetime into a PHP date
0 2155 posted 11 years ago by flatearthcomms
In this tutorial I will go over implementing Full-Text search in Laravel 4 . Those who have used Laravel 3 in the past may remember that there used to be support for FULLTEXT indexes. This functionality has been removed in Laravel 4 but can still ea...
0 1127 posted 11 years ago by CreativePunch
While the Pinnacle Cart API can handle some of this, I found it easier to query the database directly. This PCProduct class was developed for integrating Pinnacle Cart with WordPress with the following methods: - get_product($id) - get_product_by...
1 1435 posted 11 years ago by crypticsoft
This is a public jsonp api. I use it with jQuery Like This: $.getJSON("http://yourdomain/yourpath/jsonp_api.php?method=getSchema&params=your_db_name&jsoncallback=?", function(data){ //DO SOMETHING WITH THE DATA HERE }...
1 1518 posted 12 years ago by halk
Simple method to insert data to sql
0 964 posted 12 years ago by BergBenji
Update current field data.
0 1193 posted 12 years ago by tucq88
PDO-format insert array function
0 1495 posted 12 years ago by rickygri
Allows you to connect to different datasources. Very common to use something like this for development,staging and production deployments.
0 1135 posted 13 years ago by evinweissenberg
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.
1 1435 posted 13 years ago by lemcoe9
1 1369 posted 13 years ago by paul0078
0 1942 posted 13 years ago by paul0078
0 2045 posted 13 years ago by paul0078
Author: J. van Hemert Fixes encoding when utf-8-encoded data is stored in tables with other (e.g. latin_swedish_ci) encoding. Will convert all columns in all tables to utf8_general_ci.
0 2087 posted 13 years ago by sjasliek
Write less and do more mysql in php.
4 1717 posted 13 years ago by iceman
0 890 posted 13 years ago by pruntrut
If the image source is not in the database a default image is displayed.
0 1869 posted 13 years ago by blantonious
Creates table structure for pitchfx data that is provided by mlb.com. Open PHP file and enter username and password for localhost. Feel free to customize to suit your preference.
0 1948 posted 13 years ago by wa-rufio
Open PHP file and enter User Credentials for localhost. The default dates are set to negotiate the 2011 season, but change the date variables to match your desired season data. The start date should be the day before opening day, and the end date t...
0 2028 posted 13 years ago by wa-rufio
This is a very rudimentary function used to convert a Datetime delivered by the Twitter API to a format you can store in MySQL's datetime field.
0 2021 posted 13 years ago by aristoworks
Sometimes a legacy database will have HTML entities stored in it. This function converts them. Note that this function assumes you have a database abstraction layer, and may need to be modified to connect to YOUR database.
0 3533 posted 13 years ago by f6design
1 2255 posted 14 years ago by jose_506
This is a custom class for caching results through php's session. The class can be used to cache anything, but i use it to cache mysql results so i don't have to get all the time the results by querying MySQL (wich may take a long time, especialy if...
0 2346 posted 14 years ago by TimoZachi
Just a short little script that takes a mysql query and turns it into a csv file that downloads automatically. If your interested in the details you can hit up the link.
0 1331 posted 14 years ago by FatFolderDesigner
0 1092 posted 14 years ago by karmacode
« Prev 1 2 3 4 5 6 7