This is a discussion on how to append the % to a IN parameter for stored procedure within the MySQL forums, part of the Database Server Software category; --> Hi, i keep getting syntax error I am doing this CREATE PROCEDURE `db_test`.`sp_GetShopsByKeyword`(IN keyword varchar(100)) /*LANGUAGE SQL | [NOT] ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, i keep getting syntax error I am doing this CREATE PROCEDURE `db_test`.`sp_GetShopsByKeyword`(IN keyword varchar(100)) /*LANGUAGE SQL | [NOT] DETERMINISTIC | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA } | SQL SECURITY { DEFINER | INVOKER } | COMMENT 'string'*/ BEGIN SELECT * FROM shops where title like '%' + keyword '%'; END$$ this stored procedure is meant for search purposes. i am taking in a user input from the text box and then running the stored procedure where i can return all results whose title contain the keyword. How do i achieve that result ? I tried googling a bit but to no avail. Please advise. Thank you. |
| Thread Tools | |
| Display Modes | |
|
|