Monkuar Posted January 2, 2012 Share Posted January 2, 2012 $query = "LOWER(name)="$tabB"; on my forums, speakwhatsreal.com new message page, let's say somone on my site has the name "$tabB" how do i make the above query work so it selects a username with the $ symbol in it? because with that query it's linked to $DB->query("SELECT name, id, mgroup, language, email FROM ibf_members WHERE ".$query); $to_member = $DB->fetch_row(); if (empty($to_member['id'])) { $this->send_form(0, $ibforums->lang['err_no_such_member']); return; } pretty much says no results.. lol any help? Link to comment https://forums.phpfreaks.com/topic/254187-select-name-symbol/ Share on other sites More sharing options...
Pikachu2000 Posted January 2, 2012 Share Posted January 2, 2012 You'd need to escape the $ with a backslash, but something tells me there's another reason this isn't going to work. Link to comment https://forums.phpfreaks.com/topic/254187-select-name-symbol/#findComment-1303237 Share on other sites More sharing options...
scootstah Posted January 2, 2012 Share Posted January 2, 2012 Use single quotes. $query = 'LOWER(name)="$tabB"'; Link to comment https://forums.phpfreaks.com/topic/254187-select-name-symbol/#findComment-1303238 Share on other sites More sharing options...
Monkuar Posted January 2, 2012 Author Share Posted January 2, 2012 $ibforums->input['to'] = str_replace("$", "\$", $ibforums->input['to']); I FIXED IT!! YES Thanks!!! Topic Resolved!! Link to comment https://forums.phpfreaks.com/topic/254187-select-name-symbol/#findComment-1303240 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.