[PHP-DB] mssql_connect()

2008-06-02 Thread simge
hi,
I have a problem to connect MsSQL server 2005 with mssql_connect() function.
the error: fatal error undefined function mssql_connect().

I correct php.ini(unquoting php_mssql.dll)
i put it in c:/windows/system32
but still i cany see mssql library in phpinfo() page.

Please Help Me. 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] mssql_connect()

2008-06-02 Thread YVES SUCAET
My php.ini is actually in the c:\windows folder. Also: Check to see if you
have multiple versions of php.ini on your system. Maybe you have a version in
c:\php or c:\windows in addition to c:/windows/system32 and the wrong file
gets interpreted.

HTH,

Yves

-- Original Message --
Received: Mon, 02 Jun 2008 06:31:37 AM CDT
From: simge [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] mssql_connect()

hi,
I have a problem to connect MsSQL server 2005 with mssql_connect() function.
the error: fatal error undefined function mssql_connect().

I correct php.ini(unquoting php_mssql.dll)
i put it in c:/windows/system32
but still i cany see mssql library in phpinfo() page.

Please Help Me. 



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] SELECT FOR UPDATE

2008-06-02 Thread Philip Thompson

Hi all.

Which is more efficient in order to use SELECT FOR UPDATE?

% SELECT * FROM `table` WHERE (`table_id` = 32) LIMIT 1 FOR UPDATE;
% UPDATE `table` SET `field_name` = 'Pizza' WHERE (`table_id` = 32)  
LIMIT 1;


OR

% SELECT `field_name` FROM `table` WHERE (`table_id` = 32) LIMIT 1  
FOR UPDATE;
% UPDATE `table` SET `field_name` = 'Pizza' WHERE (`table_id` = 32)  
LIMIT 1;



Note: the 2nd query in each is the same. Is there any difference in  
using * and specifying the actual field you want to update? It seems  
like there would be very little difference because this is causing a  
row-lock - all the data in that row is not-updatable anyway.


I'm adding transactions and row-locking into my application. If I can  
just use the first method (because it's easier to specify '*' instead  
of every column I want to update), then I'd like to. Any thoughts are  
welcome!


Thanks in advance,

~Philip


Personally, most of my web applications do not have to factor 13.7  
billion years of space drift in to the calculations, so PHP's rand  
function has been great for me... ~S. Johnson


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php