Insert Data From a Form Into a Database
Now we will create an HTML form that can be used to add new records to the “Persons” table. Here is the HTML form: <html> <body> <form action=”insert.php” method=”post”> Firstname: <input type=”text” name=”firstname”> Lastname: <input type=”text” name=”lastname”> Age: <input type=”text” name=”age”> <input type=”submit”> </form> </body> </html> When a user clicks the submit button in the … Read more
SQL FOREIGN KEY Constraint
CREATE TABLE product ( category INT NOT NULL, id INT NOT NULL, price DECIMAL, PRIMARY KEY(category, id) ) ENGINE=INNODB; CREATE TABLE customer ( id INT NOT NULL, PRIMARY KEY (id) ) ENGINE=INNODB; CREATE TABLE product_order ( no INT NOT NULL AUTO_INCREMENT, product_category INT NOT NULL, product_id INT NOT NULL, customer_id INT NOT NULL, PRIMARY KEY(no), … Read more
Creating a table with auto_increment
CREATE TABLE example_autoincrement ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, data VARCHAR(100) ); CREATE TABLE example_innodb ( id INT, data VARCHAR(100) ) TYPE=innodb;
mount Windows share on Centos 6 or Redhat RHEL
Share one folder name Software on Windows (192.168.0.100) with username test 2. On Centos , mount that share folder to mnt folder on Server [root@localhost ~]# mount -t cifs -o username=test,password=Passw0rd //192.168. 0.100/Software /mnt 3. Now we can use that folder as our local disk [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted … Read more
MySQL CDR Backend – Asterisk
To use it, configure the module in cdr_mysql.conf. Create a table called cdr under the database name you will be using the following schema. Change the following entries in cdr_mysql.conf file located in /etc/asterisk/ folder. [global] hostname=10.0.30.47 dbname=asterisk table=cdr password=ASTERISK user=root port=3306 sock=/var/lib/mysql/mysql.sock userfield=1 loguniqueid=yes And then create a table to store the CDR data … Read more
Adding User Accounts mysql – asterisk database
Create mysql user id after logging through root user. mysql -u root -p yourpasswordforroot CREATE USER ‘monty’@’localhost’ IDENTIFIED BY ‘some_pass’; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON bankaccount*. TO ‘monty’@’localhost’; FLUSH PRIVILEGES;
“bearercapability notauth” Zoiper error
The error ‘bearercapability notauth’ suggest that the credentials are not correct. If the credentials are definitely correct, this could indicate that the user might need to be purged on the VOIP/Asterisk server.