Have you tried using a GROUP BY statement - maybe something like:

SELECT ExpDepDate, ActArrDate, Count(Ref) as NoOfRefs FROM oceandata
GROUP BY ExpDepDate, ActArrDate, Ref

Good Luck!

Dennis

----- Original Message -----
From: "Morsky Juha" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 21, 2002 7:39 AM
Subject: Strange problem with MySql & IIS & ASP


Hi All!

I've Select like this:

SELECT ExpDepDate, ActArrDate FROM oceandata

It works beautifully

But When I modify it like this

SELECT ExpDepDate, ActArrDate, Count(Ref) as NoOfRefs FROM oceandata

I'll get nothing, just a empty screen with a browser!

I'm using Ultradev to create this and when I test it in Ultradev it works
good, same in MySQL CC Admin. But not on IIS?
ASP look like this:

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/connMyIFDData.asp" -->
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_connMyIFDData_STRING
Recordset1.Source = "SELECT ExpDepDate, ActArrDate, Count(Ref) as NoOfRefs
FROM oceandata"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 10
Dim Repeat1__index
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0">
  <%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
  <tr>
    <td><%=(Recordset1.Fields.Item("ExpDepDate").Value)%></td>
    <td><%=(Recordset1.Fields.Item("ActArrDate").Value)%></td>
    <td><%=(Recordset1.Fields.Item("Act_Est").Value)%></td>
  </tr>
  <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset1.MoveNext()
Wend
%>
</table>
</body>
</html>
<%
Recordset1.Close()
%>

Any help will be helpfull

Regards
Juha Mörsky


MySQL

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to