December 2010
Intermediate to advanced
363 pages
12h 21m
English
Constructing a database query is a perfectly straightforward process. It typically proceeds something like this (for demonstration purposes, we'll assume that you have a database of wines, in which one of the fields is the grape variety):
$variety = $_POST['variety'];
So that the value of the variable $variety is now this:
lagrein
WHERE clause, something like this:
$query = "SELECT * FROM wines ...