<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx</link><description>We have been looking at various options to ensure that the design of our SQL Server Driver for PHP truly reflects the requirements of the day to day challenges that our developer community faces when building real-world web applications and service s.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#5463804</link><pubDate>Mon, 15 Oct 2007 23:19:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5463804</guid><dc:creator>xianve</dc:creator><description>&lt;p&gt;I have been waiting a long time for this driver.&lt;/p&gt;
&lt;p&gt;I am a little disappointed that it is not available for linux, but I guess MS is just protecting it's market. And from what I read IIS7 is much better these days anyway.&lt;/p&gt;
&lt;p&gt;I thing I would recommend is to have a survey to see what features users need. One of mine that I have really wanted is better error reporting. Current SQL drivers only give the last error msg, and i would like to see all the error msg that you get in the console being returned to the client (in this case PHP).&lt;/p&gt;
&lt;p&gt;Really looking forward to this project evolving. Keep up the good work.&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#5473277</link><pubDate>Tue, 16 Oct 2007 20:34:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5473277</guid><dc:creator>vbouret</dc:creator><description>&lt;p&gt;Nice move from Microsoft! The old php_mssql.dll is absolutely painful to deploy and SQL Server 2005 support is almost inexistant. It works, but you never know when it's going to break.&lt;/p&gt;
&lt;p&gt;However, I have one major concern. I believe a lot of people did their SQL Server access from PHP thru php_mssql which offers some nice API bits that are used extensively in the PHP community the most important being mssql_num_rows which returns the number of rows returned from a SELECT statement. I don't see any function like this in the API of your new extension.&lt;/p&gt;
&lt;p&gt;I have heard a lot about the fact for many database communication protocols you cannot determine in advance the size of a result set, but since most PHP developers rely on this function (also because the very popular php_mysql and php_mysqli have this function built-in) I believe it should be included in your driver.&lt;/p&gt;
&lt;p&gt;The overhead of rewriting an application to change the reliance on mssql_num_rows for something else, like two different SQL statements (one SELECT COUNT() and one normal SELECT) and the difficulty of writing cross-platform database SQL that implies COUNT should justify that you add such function.&lt;/p&gt;
&lt;p&gt;We did transitioned our application from MySQL to SQL Server recently and one of the main incentive was that the API between php_mysql and php_mssql was about the same and in two hours we were able to write a parallel DB abstraction layer supporting SQL Server.&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#5645336</link><pubDate>Wed, 24 Oct 2007 12:10:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5645336</guid><dc:creator>Wanou</dc:creator><description>&lt;p&gt;to vbouret:&lt;/p&gt;
&lt;p&gt;You should test and read (RTFM...) before asking something 8-)) .&lt;/p&gt;
&lt;p&gt;sqlsrv_stmt_rows_affected($stmt)&lt;/p&gt;
&lt;p&gt;gives the nomber of rows affected by the last statement. Which can be a select, insert, update and so on.... Tested and it works !&lt;/p&gt;
&lt;p&gt;I'm currently writing a little wrapper from php_mssql to to the new CTP.&lt;/p&gt;
&lt;p&gt;By the Way, i found a annoying bug:&lt;/p&gt;
&lt;p&gt;On SQL2005, we have a table called Document_lie with 2 fields : doc_type (varchar(50)) and doc_Document (text).&lt;/p&gt;
&lt;p&gt;Another application is putting base64 encoded text in doc_document.&lt;/p&gt;
&lt;p&gt;This code works:&lt;/p&gt;
&lt;p&gt;$sql=&amp;quot; 	Select Top 1 DOC_Type,DOC_Document from Document_lie &lt;/p&gt;
&lt;p&gt;		where Doc_Compteur =7418;&lt;/p&gt;
&lt;p&gt;			&amp;quot;;&lt;/p&gt;
&lt;p&gt;$stmt=sqlsrv_conn_execute($conn,$sql);&lt;/p&gt;
&lt;p&gt;if ($stmt) {&lt;/p&gt;
&lt;p&gt; sqlsrv_stmt_fetch( $stmt ); &lt;/p&gt;
&lt;p&gt;$typedocu=sqlsrv_stmt_get_field($stmt,1);&lt;/p&gt;
&lt;p&gt;$photostream=sqlsrv_stmt_get_field($stmt,2,SQLSRV_PHPTYPE_STREAM);&lt;/p&gt;
&lt;p&gt;$photocod='';&lt;/p&gt;
&lt;p&gt;while (!feof($photostream))&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;	$photocod.=fread($photostream,8192);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;$photobin=base64_decode($photocod);&lt;/p&gt;
&lt;p&gt;header(&amp;quot;Content-type:image/jpeg&amp;quot;);&lt;/p&gt;
&lt;p&gt;echo $photobin;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;While this one doesn't:&lt;/p&gt;
&lt;p&gt;$sql=&amp;quot; 	Select Top 1DOC_Type,DOC_Document from Document_lie &lt;/p&gt;
&lt;p&gt;		where Doc_Compteur =7418;&lt;/p&gt;
&lt;p&gt;			&amp;quot;;&lt;/p&gt;
&lt;p&gt;$stmt=sqlsrv_conn_execute($conn,$sql);&lt;/p&gt;
&lt;p&gt;if ($stmt){&lt;/p&gt;
&lt;p&gt;	while ($result=sqlsrv_stmt_fetch_array($stmt, SQLSRV_FETCH_TYPE_ASSOC)){&lt;/p&gt;
&lt;p&gt;			$photocod=$result['DOC_Document'];&lt;/p&gt;
&lt;p&gt;			$photobin=base64_decode($result['DOC_Document']);&lt;/p&gt;
&lt;p&gt;			$typedocu=$result['DOC_Type'];&lt;/p&gt;
&lt;p&gt;	}&lt;/p&gt;
&lt;p&gt;header(&amp;quot;Content-type:image/jpeg&amp;quot;);&lt;/p&gt;
&lt;p&gt;echo $photobin;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;In fact, if you look at $photocod, you see the problem easily: $photocod gets the good length (in my case 80734 bytes), but only the first 65535 bytes are correct. The rest is filled with garbage. Looks like a pointer problem.&lt;/p&gt;
&lt;p&gt;Anyway, keep up the good work !&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#5657247</link><pubDate>Thu, 25 Oct 2007 00:58:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5657247</guid><dc:creator>Brian Swan</dc:creator><description>&lt;p&gt;@xainve&lt;/p&gt;
&lt;p&gt;Thanks for your feedback. Can you clarify what you mean by &amp;quot;all error messages&amp;quot;? Currently, sqlsrv_errors() and sqlsrv_warnings() return *all* errors and warnings that occured on the last operation. Using print_r would be a good way to see the structure of what is returned by each of these functions. For example, you could try this:&lt;/p&gt;
&lt;p&gt;die( print_r( sqlsrv_errors( ), true ) );&lt;/p&gt;
&lt;p&gt;If this isn't what you are looking for regarding errors sent to the client, please let us know.&lt;/p&gt;
&lt;p&gt;Brian Swan&lt;/p&gt;
&lt;p&gt;Programming Writer&lt;/p&gt;
&lt;p&gt;SQL Server Driver for PHP&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#5657315</link><pubDate>Thu, 25 Oct 2007 01:05:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5657315</guid><dc:creator>Brian Swan</dc:creator><description>&lt;p&gt;@vbouret&lt;/p&gt;
&lt;p&gt;This is great feedback...thanks. We will definitely be looking into the specific issue you raise (returning the number of results from a SELECT) in the near future. Of course, we are also interested in the more general ease-of-portablility issue and will re-visit it as development continues.&lt;/p&gt;
&lt;p&gt;Thanks again...please keep your thoughts/comments/feedback coming.&lt;/p&gt;
&lt;p&gt;Brian Swan&lt;/p&gt;
&lt;p&gt;Programming Writer&lt;/p&gt;
&lt;p&gt;SQL Server Driver for PHP&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#5657353</link><pubDate>Thu, 25 Oct 2007 01:12:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5657353</guid><dc:creator>Brian Swan</dc:creator><description>&lt;p&gt;@Wanou&lt;/p&gt;
&lt;p&gt;You've hit on a limitation that was imposed in order to get an API into your hands quickly. Jay, a member of our team, responded to your question in the SQL Server Data Access forum: &lt;a rel="nofollow" target="_new" href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2313619&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2313619&amp;amp;SiteID=1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I'll follow up with a blog post soon that highlights how the current streaming capabilities can be used to overcome this limitation.&lt;/p&gt;
&lt;p&gt;Thanks for your feedback.&lt;/p&gt;
&lt;p&gt;Brian Swan&lt;/p&gt;
&lt;p&gt;Programming Writer&lt;/p&gt;
&lt;p&gt;SQL Server Driver for PHP&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#5665572</link><pubDate>Thu, 25 Oct 2007 14:33:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5665572</guid><dc:creator>Wanou</dc:creator><description>&lt;p&gt;Oooops !&lt;/p&gt;
&lt;p&gt;$sql='Select Top 10 DOC_Type, Doc_Document from Document_lie';&lt;/p&gt;
&lt;p&gt;$stmt=sqlsrv_conn_execute($conn,$sql);&lt;/p&gt;
&lt;p&gt;echo 'Rows: '.sqlsrv_stmt_rows_affected($stmt).'&amp;lt;br/&amp;gt;';&lt;/p&gt;
&lt;p&gt;while ($result=sqlsrv_stmt_fetch_array($stmt, SQLSRV_FETCH_TYPE_ASSOC)){ }&lt;/p&gt;
&lt;p&gt;echo 'Rows: '.sqlsrv_stmt_rows_affected($stmt).'&amp;lt;br/&amp;gt;';&lt;/p&gt;
&lt;p&gt;Gives: &lt;/p&gt;
&lt;p&gt;Rows: -1&lt;/p&gt;
&lt;p&gt;Rows: 10&lt;/p&gt;
&lt;p&gt;Sorry vbouret.... It doesn't work as I thought it was !&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#5695400</link><pubDate>Fri, 26 Oct 2007 23:09:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5695400</guid><dc:creator>xianve</dc:creator><description>&lt;p&gt;Previous mssql driver only returned the last error msg.&lt;/p&gt;
&lt;p&gt;eg. mssql_get_last_message()&lt;/p&gt;
&lt;p&gt;And in an environment where you call one SP, which calls another, all with transactions, if the inner most fails, there is several error msgs, allowing one to traceback to where the problem is.&lt;/p&gt;
&lt;p&gt;Glad to see that this driver accounts for this. (Will test and see)&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#6249688</link><pubDate>Thu, 15 Nov 2007 11:52:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6249688</guid><dc:creator>JanBlaha</dc:creator><description>&lt;p&gt;It's good to see at least something happening. But what I would really appreciate is the PDO extension for sqlsrv. Standalone php database driver goes against the current trend in php development.&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#6616945</link><pubDate>Fri, 30 Nov 2007 18:27:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6616945</guid><dc:creator>James.Easterling</dc:creator><description>&lt;p&gt;I think that the drivers are great, but lack in a object/class approach like mysqli. Is there any plans to allow both styles? Also, I think it would great if there was a way to pass in the Database to use... so as to not require a second call to execute the &amp;quot;Use Database&amp;quot; query before the actual query. &amp;nbsp;If use database functionality is there I did not see it. Great job overall!&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#6889073</link><pubDate>Sat, 29 Dec 2007 01:12:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6889073</guid><dc:creator>travis_pdx</dc:creator><description>&lt;p&gt;I am thrilled that this is coming out... I've been stuck in that awkward middle ground of PHP/MSSQL for years, and having a true native driver sounds awesome.&lt;/p&gt;
&lt;p&gt;But I just tested it, and unless I am missing something, there is no Unicode support... without which this is a complete non-starter for me at least. Is there a hidden config switch or something? Or plans to support Unicode in the full release?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;--Travis&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#6889158</link><pubDate>Sat, 29 Dec 2007 01:27:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6889158</guid><dc:creator>CMaz</dc:creator><description>&lt;p&gt;I am an old sql server user &lt;/p&gt;
&lt;p&gt;I try to use a lot of php software and they came all with Mysql support&lt;/p&gt;
&lt;p&gt;I was very happy to get this release ....&lt;/p&gt;
&lt;p&gt;I look after store procedure support and i didn't find anything about it.&lt;/p&gt;
&lt;p&gt;Have i miss something ou there is nothing at this time ?&lt;/p&gt;
&lt;p&gt;Is there somethong planned for the next 3 months ?&lt;/p&gt;
&lt;p&gt;Thanks for your feedback&lt;/p&gt;
&lt;p&gt;Best regards from France&lt;/p&gt;
</description></item><item><title>re: Transparency in the Design Process</title><link>http://blogs.msdn.com/sqlphp/archive/2007/10/11/transparency-in-the-design-process.aspx#6961145</link><pubDate>Thu, 03 Jan 2008 03:26:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6961145</guid><dc:creator>W1lz0r</dc:creator><description>&lt;p&gt;I am very happy this driver is coming. I ran some tests on the CTP version and miss some functionality;&lt;/p&gt;
&lt;p&gt;- sqlsrv_num_rows(): I use this mssql extension counterpart quite often. I am now forced to do a count query as an alternative. I prefer having this function instead.&lt;/p&gt;
&lt;p&gt;- sqlsrv_select_db(): eventho you can run a USE db query. As far as I'm concerned this could even be part of the connect statement as optional parameter.&lt;/p&gt;
&lt;p&gt;- sqlsrv_data_seek(): to mimic a limit statement on SQL Server I use TOP x followed by a data_seek on the resultset. I can do a sqlsrv_stmt_fetch until I reach the start row, but that might be slower then a data_seek that moves the pointer in one step.&lt;/p&gt;
&lt;p&gt;- the limit of 64k on retrieval of columns should avoidable (ini-directive maybe).&lt;/p&gt;
&lt;p&gt;- some bugs I ran across which I posted on the forum.&lt;/p&gt;
&lt;p&gt;- on the positive side I am very glad we can retrieve all error messages. This is a limitation of the PHP MSSQL extension that annoyed me for a long time.&lt;/p&gt;
&lt;p&gt;For a first release I suppose this is pretty decent. I am wondering when we will see more information on the design process as promised in this post.&lt;/p&gt;
</description></item></channel></rss>