Question : Using the COUNT function??

The following select statement produces the results as found in png file title 'TableData'...

1:
2:
3:
4:
5:
6:
7:
SELECT     TOP (100) PERCENT sn.ID, u.ID AS UserID, sn.parentID, sn.RoleID, sn.AppTopicNum, sn.AppTopicDesc, sn.TabText, sn.Path
FROM         dbo.SiteNavigation AS sn inner JOIN
                      dbo.Roles AS r ON sn.RoleID = r.ID inner JOIN
                      dbo.UserRoles AS ur ON r.ID = ur.RoleID INNER JOIN
                      dbo.Users AS u ON ur.UserID = u.ID
where u.id = 2
order by sn.tabtext


Regarding the results as shown in the pic, how do I add a column titled 'TabTextCount' that would count rows that have identical info only in the columns 'TextTab' & 'Path' (in the pic this would be row #'s 13 & 14); rows 17 & 18 would have a count of 1 since the 'Path' is different?

Brad

 
Attachments:
 
TableData
TableData
 

Answer : Using the COUNT function??

On a standard windows build, PDO is already installed and active.

At a command prompt, type ...

php -n -m

The -n says ignore all config files and use the built in defaults.
The -m says show all modules.

For me, this shows ...

[PHP Modules]
bcmath
calendar
com_dotnet
Core
ctype
date
dom
ereg
filter
ftp
hash
iconv
json
libxml
mcrypt
mhash
mysqlnd
odbc
pcre
PDO
Phar
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]


If I use php -m ...

[PHP Modules]
bcmath
bz2
calendar
com_dotnet
Core
ctype
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mhash
mysqlnd
odbc
openssl
pcre
PDO
Phar
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
sqlsrv
standard
tidy
tokenizer
wddx
win32service
wincache
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]


To activate the informix PDO extension, you will need the php_pdo_informix.dll file.

Unfortunately, you will need to build this yourself at the moment. A lot of the non standard extensions are available from http://downloads.php.net/pierre/, but not this one.

You would also need the informix drivers. The php_pdo_informix.dll file is a bridge between PHP's PDO mechanism and the Informix drivers. PHP does not directly talk to the Informix database.

The source to the PDO driver is available via anonymous SVN from http://svn.php.net/viewvc/pecl/pdo_informix/

You can go with one of the stable tagged releases (the latest being http://svn.php.net/viewvc/pecl/pdo_informix/tags/RELEASE_1_2_6/) or the development trunk (http://svn.php.net/viewvc/pecl/pdo_informix/trunk).

Compiling PHP is not a simple point and click process, but is quite easy to achieve. You require a modern version of Microsoft Visual C++ compiler - I use the Express Edition just fine.

Regards,

Richard Quadling.
Random Solutions  
 
programming4us programming4us