Reputation: 1915
I have a stored procedure that it works correctly on localhost but when i tried to execute that on my vps server, i give an empty result.
CREATE PROCEDURE `sp_contest_selectContestId`(
IN _uniquetitle VARCHAR(300))
BEGIN
SELECT `id`
FROM `contest`
WHERE
`uniquetitle` = _uniquetitle
LIMIT 0, 1
;END
When i use this part without using procedure with the same data to test, i have not any problem:
SELECT `id`
FROM `contest`
WHERE
`uniquetitle` = _uniquetitle
LIMIT 0, 1
Upvotes: 3
Views: 1249
Reputation: 1915
I was using UTF-8 data. My tables was UTF8 but not my database. database was latin_swedish.
I change my database collation to UTF8 and then import my data again. problem solved.
I had to set mydatabase collation to UTF-8 befor insert or import any things.
Upvotes: 1