php-windows Digest 30 Aug 2003 05:22:52 -0000 Issue 1892 Topics (messages 21273 through 21278):
How to get script name and line number 21273 by: William Cheung 21276 by: Brian McGarvie Re: db connection php & mssql & win2k 21274 by: jsWalter Re: MS SQL query problem 21275 by: Svensson, B.A.T. (HKG) Re: help with building 2 dll's needed 21277 by: Brian McGarvie MS SQL questions 21278 by: BhongOng Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
--- Begin Message ---
I need to error log the script name and the line number that an error occurs. Are there built-in variables I could make use of?
William
--- End Message ---
--- Begin Message ---"William Cheung" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >>I need to error log the script name and the line number that an error occurs. Are there built-in variables I could make use of? There are 2 ways to get file name: 1) Using the 'magic constatns': $thefile = __FILE__; 2) Using $_SERVER superarray: $thefile = $_SERVER['SCRIPT_NAME']; Note:1) will return the FULL path, 2) will return the relative path. There is only one way to get line number that i know of: $theline = __LINE__; But it will quite literally be the line that __LINE__ is used.
--- End Message ---
--- Begin Message ---This is what I use... // Pull in DB PEAR Collection require_once 'DB.php'; // What kind of database server are we connecting too? $db_type = 'mysql'; // local connectivity data $db_host = 'localhost'; $db_user = 'dbUsername $db_pass = 'dbUserPW'; $db_name = 'dbName'; // Data Source Name: This is the universal connection string $dsn = "$db_type://$db_host/$db_name"; // DB::connect will return a PEAR DB object on success // or an PEAR DB Error object on error $db = DB::connect($dsn); // With DB::isError you can differentiate between an error or // a valid connection. if (DB::isError($db)) die ($db->getMessage()); // Build Query $strSql = 'SELECT * '; $strSql .= ' FROM tableName '; $strSql .= ' WHERE feild_1 = x '; // Query the db $result = $db->query($strSql); // Always check that $result is not an error if (DB::isError($result)) die ($result->getMessage()); // close conection $db->disconnect(); // Now you have the returned results in $results. // Do as you will Walter
--- End Message ---
--- Begin Message ---How are you connected?. Do you use an ODBC conenction, or just a plain query in isqlw.exe, or? In any case you should check your connection settings. Otherwise you might be able to typical state in your query: SET ANSI_WARNINGS <OFF|ON> etc.... -----Original Message----- From: Omar To: [EMAIL PROTECTED] Sent: 28-8-03 19:28 Subject: [PHP-WIN] MS SQL query problem I have a sql query, something like SELECT x FROM server1.table WHERE x IN (SELECT x FROM server2.table) I get a warning when loading the page. This is the warning: Warning: MS SQL message: Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query. (severity 16) I don?t know what to do, where to look... Thanks for any help. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---you dont need MS VC++ any C++ compiler will do the job. try: http://www.delorie.com/djgpp/ "Grzegorz Godlewski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello! > > I need two compiled extensions for php 4.3.3: > - bcompiler (I think somebody has it already compiled) > - php-xerces (source is available at http://ggodlewski.host.sk/download/php-xerces/php-xerces-0.6.tar.gz) > I tried to build them with mingw32 and cygwin - without effect :( > Unfortunately I don't have MSVC. > Could anybody send me this modules? Thanks in advance. > > BR. > -- > \ Grzegorz Godlewski / > / Mail: [EMAIL PROTECTED] GG: 1600799 ICQ UIN: 118261503 \
--- End Message ---
--- Begin Message ---Hi, I'm using MSSQL for my database application and not yet ready to transfer my data to MySQL because of the file limit. We have a very huge database. MS SQL 7 Windows2000 Adv. Server IIS 5 PHP 4.3.0 MySQL with MyODBC Visual Basic & MS Access as client We are developing a web application to access our data from MS SQL.. what are the softwares or driver do we need? Can somebody give me some code samples? I tried to use mssql_connect() syntax but it returns some error.. Thanks. Calixto Ong II
--- End Message ---