Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] PHP functions to create MySQL syntax? (was: Do you whitelist or blacklist utf-8?)
- Date: Wed, 23 Feb 2011 17:34:26 +0100
- From: Josh Glover <jmglov@example.com>
- Subject: Re: [tlug] PHP functions to create MySQL syntax? (was: Do you whitelist or blacklist utf-8?)
- References: <4D639689.1010302@example.com> <4D63EFBC.1020900@example.com> <4D64E948.2020703@example.com> <4D652DB1.9080309@example.com>
On 23 February 2011 16:54, Dave M G <dave@example.com> wrote: > After reading this, I've been looking around the PHP manual, and I don't > see any "mechanisms" for constructing SQL queries. http://www.petefreitag.com/item/356.cfm In a nutshell: $offset = 0 $db_connection = new mysqli("localhost", "user", "pass", "db"); $statement = $db_connection->prepare("SELECT * FROM foo WHERE bar = ? AND id > ? AND id <= ?"); $statement->bind_param("sii", "baz", $id, $id + 123); $statement->execute(); > Surely if any language had MySQL syntax constructors it would be PHP.... Surely you were being sarcastic... ;-P All of the high-level languages wrap the MySQL C API, so you could say "Surely if any language had MySQL syntax constructors it would be C!" -- Cheers, Josh
- References:
- [tlug] Do you whitelist or blacklist utf-8?
- From: Dave M G
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Shmuel Fomberg
- Re: [tlug] Do you whitelist or blacklist utf-8?
- From: Peter Brandt
- [tlug] PHP functions to create MySQL syntax? (was: Do you whitelist or blacklist utf-8?)
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Do you whitelist or blacklist utf-8?
- Next by Date: Re: [tlug] cacert question
- Previous by thread: [tlug] PHP functions to create MySQL syntax? (was: Do you whitelist or blacklist utf-8?)
- Next by thread: [tlug] Solaris tar: how to pre-pend a parent directory?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links