php - Working with jquery-mobile and database connections -


When working with what method is required to keep a database connection jQuery- mobile?

I have a ** connections.php from the beginning **

This file tries to make a global and continuous connection as ... < Pre> connect function () {global $ conn; $ Hostdb = 'localhost'; $ Nameb = 'xxxx'; $ Userdb = 'xxx'; $ Passdb = 'xxx'; $ Dsn = "mysql: host = $ hostdb; dbname = $ nameb; charset = utf8"; $ Opt = array (PDO :: ATTR_ERRMODE = & gt; PDO :: ERRMODE_EXCEPTION, PDO :: ATTR_DEFAULT_FETCH_MODE = & gt; PDO :: FETCH_ASSOC, PDO :: ATTR_PERSISTENT = & gt; true); Here // I've added a persistent connection !! $ Conn = new PDO ($ DSN, $ userdb, $ passb, $ opt); }

The site is within jquerymobile which keeps the current page in the browser and the next required .php loads as necessary.

I have been unable to find special information about how jqueryMobile works with different php pages and how the connection is continuous.

Does jqueryMobile deny the need for continuity?

Do I need to establish a connection on each .php page as it is called (and produces the next 'html')?

What do I have global variable $ Con require different functions (which requires a separate .php pages) is required, the database connection to pass?

The constant connection PHP process can be applied between the MySQL - but usually The PHP process ends once it is requested that you do not see any benefit in using them.

it does not negate the need to need to know nothing about JavaScript DB implementation or if persistence is being used

jquerymobile persistency -. It does not have any business in the

If you are confused dB strongly with the state - you should look to the session cookies to deal with web app status.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -