php - Same SQL query works in Heidi, doesn't via mysql_query -
i've got piece of code (connection db not included):
$query = "select ....... name='name1'"; echo $query; $result = mysql_query($query);
when run script, mysql_num_rows($result)
says 0 rows found. copy $query
browser heidi, run it, 1 row found (as expected). copy $query
browser directly mysql_query
, run script, 1 row found.
if change name1
other entry, script works well! example of problem name has no special characters: uniwersalna praline Бордюр 2,3x60
it's windows-1251 encoding. script , database encoded in it.
why mysql_query
couldn't find row? our lead-dev couldn't me...
update: moved mysqli_*
- same result.
i getting name
external file. in text editor , in browser (even in source code viewer) space
characters looking normally, in fact other special characters. rendered in source code viewer of browser normally, that's why query executed in heidi.
Comments
Post a Comment