2015-08-30, 07:55 AM
I'm having a problem where if the user has a space in their name, it doesn't return in the MyBB $db object when searching for them via SQL by their username.
for example:
Returns 0 for usernames with spaces.
For example if the username is a Rec
query = username IN('a Rec')
the Result is:
I can't understand why this happe
ns. Running the same query in PHPMYADMIN works perfectly.
Anybody can shine a light on this? It works great if the username has no space.
for example:
$query = $db->simple_select('users', 'uid, username', "username IN({$userNames})");
Returns 0 for usernames with spaces.
For example if the username is a Rec
query = username IN('a Rec')
the Result is:
mysqli_result Object
(
[current_field] => 0
[field_count] => 2
[lengths] =>
[num_rows] => 0
[type] => 0
)
I can't understand why this happe
ns. Running the same query in PHPMYADMIN works perfectly.
Anybody can shine a light on this? It works great if the username has no space.