Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: PHP and MSSQL query question

Started 4 months ago by Matt Leach
Hi, I am trying to stick a couple of queries in a test page that I have got up and running - but I am unable to  get 1 query to display correctly - I keep getting Resource ID #4 or Array displayed back instead. Code is as follows: $sql1 = "select count(*) from mytable" ; $sql_result1 = mssql_query($sql1,$ connection ); echo "There are currently $sql_result1" ; echo " users logged ...
Site: Microsoft TechNet Forums  Microsoft TechNet Forums - site profile
Forum: SQL Server Driver for PHP  SQL Server Driver for PHP - forum profile
Total authors: 2 authors
Total thread posts: 2 posts
Thread activity: no new posts during last week
Domain info for: microsoft.com

Other posts in this thread:

AaronDM replied 4 months ago
Although this forum is not for the php_mssql php extension, your question would apply to both. You have to fetch the results returned by your query, so you can use the following: http://ca.php.net/manual/en/function.mssql-fetch-a rray.php http://ca.php.net/manual/en/function.mssql-fetch-r ow.php http://ca.php.net/manual/en/function.mssql-fetch-o bject.php First two being the ones you most...

 

Top contributing authors

Name
Posts
Matt Leach
1
user's latest post:
PHP and MSSQL query question
Published (2009-09-01 15:42:00)
Hi, I am trying to stick a couple of queries in a test page that I have got up and running - but I am unable to  get 1 query to display correctly - I keep getting Resource ID #4 or Array displayed back instead. Code is as follows: $sql1 = "select count(*) from mytable" ; $sql_result1 = mssql_query($sql1,$ connection ); echo "There are currently $sql_result1" ; echo " users logged onto the...
AaronDM
1
user's latest post:
PHP and MSSQL query question
Published (2009-09-02 05:23:00)
Although this forum is not for the php_mssql php extension, your question would apply to both. You have to fetch the results returned by your query, so you can use the following: http://ca.php.net/manual/en/function.mssql-fetch-array.php http://ca.php.net/manual/en/function.mssql-fetch-row.php http://ca.php.net/manual/en/function.mssql-fetch-object.php First two being the ones you most likely ones you could choose from. Read the php manual...

Related threads on "Microsoft TechNet Forums":

Related threads on other sites:

Thread profile page for "PHP and MSSQL query question" on http://social.technet.microsoft.com. This report page is a snippet summary view from a single thread "PHP and MSSQL query question", located on the Message Board at http://social.technet.microsoft.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity