Wrox Programmer Forums
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL 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 January 28th, 2005, 11:12 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default count()

running this command in mysql control centre in winxp gives me back the value - '28':

select count(trip_details.trip_id) from trip_details INNER JOIN trip_master on (trip_details.trip_id = trip_master.trip_id) where trip_master.regular_trip <> 'Cancelled'

but in asp,

<%
total_segments = "select count(trip_details.trip_id) from trip_details INNER JOIN trip_master on (trip_details.trip_id = trip_master.trip_id) where trip_master.regular_trip <> 'Cancelled'"
response.write "Total Segments = " & total_segments & "<br>"
%>

gives me:

Total Segments = select count(trip_details.trip_id) from trip_details INNER JOIN trip_master on (trip_details.trip_id = trip_master.trip_id) where trip_master.regular_trip <> 'Cancelled'

any ideas?

Picco

__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
 
Old January 28th, 2005, 01:44 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

What is the result after executing the sql command?

Om Prakash





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL: Count = Count + 1 elayaraja.s XSLT 3 July 18th, 2008 03:21 AM
how to count? wkm1925 SQL Server 2000 2 February 26th, 2007 11:57 AM
is there any in built function to count page count g.tamilselvan MySQL 1 February 15th, 2006 07:43 AM
Need Count Help ~Bean~ SQL Language 11 August 9th, 2005 11:22 PM
Count, sum, count a value, return records CongoGrey Access 1 April 18th, 2005 02:25 PM





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