Re: [PHP3] Query in PHP

From: Date: Thu, 25 May 2000 07:31:46 +0000
Subject: Re: [PHP3] Query in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-514@lists.php.net to get a copy of this message
Mssql_connect() establishes a connection to a MS SQL server. The servername argument has to be a valid servername. ie., in ur case MSSQL should be a valid servername. "Graficali" <helpdesk@graficali.com> wrote in message news:001701bfc619$be3cc940$194cc5cb@saif.saif.com... 1. I have installed php3 on windows NT and the web server is iis4. 2. Now i want to use php3 with ms sql-server as database. 3. installed php3 in 'c:\php3' 4. windows NT is installed on d: drive 5. copied php.ini to d:\winnt 6. copied (yaz.dll, libcomm.dll, libdb.dll, libmine.dll libmysql.dll, libsmtp.dll, msql.dll, nsldap32v30.dll xmlparse.dll, xmltok.dll, Ldap32.dll) to d:\winnt\system32 7. Table in sql-server is 'tsiteuser' and the columns are 'userid','password' 8. Written code is : <html> <body> <?php echo "Hi! swapnil"; $conn=mssql_connect("MSSQL","swaps","swaps"); mssql_select_db("tsiteuser",$conn); $result=mssql_query("select * from tsiteuser"); printf("user id : %s<br>\n",mssql_result($result,0,"userid"); printf("password : %s<br>\n",mssql_result($result,0,"password"); ?> </body> </html> 9. the output is : Hi! swapnil fatal error : call to unsupported or undefined function mssql_connect() 10. Changes which i have done in php3.ini a) uncommented extension= php3_mssql.dll b) set extension_dir=c:\php3 c) set browscap = d:\winnt\system32\inetsrv\browscap.ini 11. I don't know what to do with(in php3.ini) a) include_path b) doc_root c) user_dir d)upload_tmp_dir 12. query : a) whether any .dll file is missing in 'd:\winnt\system32' or 'c:\php3' b) any library file should be added to support ms sql-server functions. c) how to retrieve and store data in database send an example also.

« previous php.general (#514) next »