Thanks a lot...any suggestion to modify the node code of mysql
connection...where to move it so that it works the same way as of the PHP
code?

On Wed, Feb 18, 2015 at 4:01 PM, Aria Stewart <[email protected]> wrote:

>
> > On Feb 18, 2015, at 1:53 PM, Anirban Bhattacharya <
> [email protected]> wrote:
> >
> > This is my node code
> >
> > var http = require('http');
> > var mysql = require('mysql');
> > var connection =  mysql.createConnection({
> >       host : 'localhost',
> >       user : 'root',
> >       password: '########'
> >   });
> >
>
> This creates a single connection to mySQL for all requests to share, which
> will queue.
>
> > ========================PHP Code===========================
> >
> > <?php
> > mysql_connect("localhost","root","#########");
> > mysql_select_db("test");
>
>
> This creates a new connection to mySQL for each request, and will execute
> in some sort of parallel.
>
> That should explain some difference.
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "nodejs" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nodejs/mf0Qhj1WVl8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/241EEB7E-3867-472D-A425-16CAC73BDDA1%40nbtsc.org
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CANjZ2S6Rci8MoByRdHJO%3DOGmFP3%3D4T5OpBiaa3n5QOntUDuYXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to