Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Quercus

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2011, 05:50 PM
si.ruslan si.ruslan is offline
Junior Member
 
Join Date: Jan 2011
Posts: 7
Default [invalid] mysql_connect with db_name parameter can't connect to DB

May be a bug?
works fine
PHP Code:
    $db = mysql_connect("localhost""user""psswd");     mysql_select_db("db_name", $db);     $res = mysql_query ("SELECT * FROM  `test`", $db);     echo $res; 
response : "MysqliResult[JDBC4ResultSet]"

not works
PHP Code:
    $db = mysql_connect("localhost""user""psswd""db_name");     $res = mysql_query ("SELECT * FROM  `test`", $db);     echo $res; 
response : false
Reply With Quote
  #2  
Old 01-31-2011, 11:07 PM
domdorn domdorn is offline
Administrator
 
Join Date: Dec 2009
Location: Vienna / Austria
Posts: 97
Default

there is no fourth argument in mysql_connect to specify the db-name.
please see http://de.php.net/mysql_connect
for the allowed arguments.
Reply With Quote
  #3  
Old 02-01-2011, 07:23 PM
si.ruslan si.ruslan is offline
Junior Member
 
Join Date: Jan 2011
Posts: 7
Default

Sorry ... You are righ
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:47 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.