Simple patch for function searchAndReplace($query, $post) SQL error
phpipam open-source IP address management
Brought to you by:
myha
In the file:
<WEBROOT>/functions/functions-admin.php
the following line must be replaced:
function searchAndReplace($query, $post)
{
global $database;
/* check how many records are in database */
ipaddresses
where '. $post['field'] .' like "%'. $post['search'] .'%";';ipaddresses
where '. $post['field'] .'
like "%'. $post['search'] .'%";';The "$post['field']" needs to be enclosed, as otherwise filed with spaces or other characters cause SQL errors.
Thomas Moroder
server24.eu
Anonymous
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
The formatting is taking away the backticks/field enclosures which must be added.