In the last episode (Dec 29), Mario Lucero said:
> I need to use this sentence with parameter but I couln't have which
> is the symbol that is equal to parameter.
> For instance: SELECT * FROM EMPLOYEES WHERE last_name LIKE ? + "%"
> ? means parameter
Are you sure you want to add two strings together? That's a math
operation, and you'll just get zero. You probably want
WHERE last_name LIKE concat(?, "%")
or WHERE last_name LIKE ?
, and make sure the string you're passing in has a % at the end.
Note that only MySQL 4.1 and above truly support parameters (aka bind
variables); if you're using mysql 3.23 or 4.0, your language's database
API will have to expand them before sending the query to mySQL.