Web Scrapers Generator BrowserExt

dbconnect

Establishes a connection to the mysql database.

dbconnect(host, user, password, db)
    

Parameters:

host Database server host.
user Username.
password Password.
db The database name.

Returned value: the connection ID.

This function can not be executed in the "Editor".

Example 1. Lets suppose that there is products table in the test database, containing id, t, d and p columns. At the first place we form the table from the returned data, then we will search for every string in the database. If we don't find a record with the relevant data, then insert a new record to the database.