All pastes #2121044 Raw Edit

Miscellany

public text v1 · immutable
#2121044 ·published 2012-02-23 15:22 UTC
rendered paste body
Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in /root/audit/solus_audit.php on line 115


                        else
                        {
                                $sql = 'INSERT INTO u5nrg_vhoststats (cloud, ip, hostname, used_memory, total_memory,
                                        used_disk, total_disk, num_guests, free_ips) VALUES (":cloud:", ":ip", ":hostname",
                                        :used_memory, :total_memory, :used_disk, :total_disk, :num_guests, :free_ips)';
                                        $stmt = $db->prepare($sql);
                        }


                        // Insert data into table
                        $stmt->bindParam(':cloud', $cloud);
                        $stmt->bindParam(':ip', $result['ip']);
                        $stmt->bindParam(':hostname', $result['hostname']);
                        $stmt->bindParam(':used_memory', $used_memory);
                        $stmt->bindParam(':total_memory', $result['allocatedmemory']);
                        $stmt->bindParam(':used_disk', $used_disk);
                        $stmt->bindParam(':total_disk', $result['disklimit']);
                        $stmt->bindParam(':num_guests', $result['virtualservers']);
                        $stmt->bindParam(':free_ips', $result['freeips']);