Wrox Programmer Forums
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 28th, 2005, 10:28 PM
Authorized User
Join Date: Dec 2005
Posts: 21
Thanks: 0
Thanked 1 Time in 1 Post
Default Binding in MS SQL

I'm trying to learn how to most efficiently access MS SQL databases. I have a stored procedure that I can call using the format:
$Result = mssql_query("sp_MyProc varA varB");
This seems to work OK but I wonder if it would be more efficient to use
$stmt = mssql_init('myProc');
mssql_bind($stmt, '@varA', $varA, SQLINT4, 0);
mssql_bind($stmt, '@varB', $varB, SQLINT4, 0);
$Result = mssql_execute($stmt);
Is this second method any more efficient for executing queries that get executed a lot? If not, what advantage does it offer? I really don't understand this second method, especially the fourth parameter (SQINT4).

Similar Threads
Thread Thread Starter Forum Replies Last Post
Database migration MS Access 2003 to MS SQL 2000 ayazhoda SQL Server 2000 3 April 23rd, 2007 11:38 AM
MS ACCESS 2003 FRONTEND AND MS SQL SERVER 2005 DB mohankumar0709 SQL Server 2005 3 March 23rd, 2007 12:48 AM
How to get value of SQL before binding it to Data su C# 0 December 4th, 2006 04:10 PM
Binding MS Access data to DropDownList aleahy Classic ASP Basics 1 April 25th, 2005 06:02 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.