Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 28th, 2005, 10:28 PM
Authorized User
 
Join Date: Dec 2005
Location: , , .
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:
Code:
$Result = mssql_query("sp_MyProc varA varB");
This seems to work OK but I wonder if it would be more efficient to use
Code:
$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).

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:49 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.