New DB insert BUG.... at page snmp_cache_view.php

biapar

12-02-2004 04:41:35

DB_ERROR Couldn't execute query

INSERT INTO sub_devices SET dev_id='8', type=3, name='A\'


You have an error in your SQL syntax near ''A\'' at line 1

Solved as
in function function make_disk_graph insert

$index_value = str_replace("\\", "", $index_value);

// create the subdevice
db_update("INSERT INTO sub_devices SET dev_id='$dev_id', type=3, name='$index_value'");
$sd_id = db_insert_id();
db_update("INSERT INTO sub_dev_variables SET sub_dev_id=$sd_id, name='$index_type', value='$index_value'");
db_update("INSERT INTO sub_dev_variables SET sub_dev_id=$sd_id, name='dskIndex', value='$index', type='dynamic'");






D D [bb571bf18d7][/bb571bf18d7]

balleman

14-02-2004 09:56:33

This will be handled by bug#155 as well.