HOw Do I count and identify the number of groups in a groups output.

I have a query that reads like this..
SELECT s.spec_Sort,s.spec_ID, s.spec_Name, b.bus_Name,
b.bus_ID
FROM (tbl_businesses as b INNER JOIN tbl_SpecBusRel as sb ON
b.bus_ID = sb.specbus_busid) INNER JOIN tbl_specialties as s ON
sb.specbus_specid = s.spec_ID
ORDER BY s.spec_Sort, b.bus_Name
and then I am outputing like this...
<cfoutput query="rsGetSpecialties" group="spec_Name">
<cfif THIS IS WHAT I
NEED)></td><td></cfif>
<h2><a class="specialty" href="javascript;"
onclick="dwfaq_ToggleOMaticDisplay(this,'#spec_ID#');return
document.MM_returnValue">#spec_Name#</a></h2>
<div id="#spec_ID#" style="display:none">
<cfoutput><p><a
href="#request.details#?bus_ID=#bus_ID#">#bus_Name#</a></p></cfoutput>
</div>
</cfoutput>
This displays in this manner...
Specialty
dealer
Specialty
dealer1
dealer2
Etc...
What I am trying to do is find out how many specialties there
are, figure out where the middle is so I can insert a new table
data cell and start a new column.
Basically - two columns with the data divided in half by
specialty NOT by the number of dealers.
I hope that makes sense. Of course I am trying to do it w/ as
little query action as possible. My only solution may be to have
more than one query and the second only finds a list of the
sepcialties that contain the dealers and then find the middle one
and simply say if current specialty = middleSpecialty then start a
new column.
Thanks all,
Chris

Thanks for the replies. I don't need the number of occurances
of each specialties - I simply need to know how many specialties
there are and then split them in half.
This may be the long way around -but it is what I did...
<cfquery name="rsGetSpecialties" >
SELECT s.spec_Sort,s.spec_ID, s.spec_Name, b.bus_Name,
b.bus_ID, b.bus_Pcity, b.bus_PState
FROM (tbl_businesses as b INNER JOIN tbl_SpecBusRel as sb ON
b.bus_ID = sb.specbus_busid) INNER JOIN tbl_specialties as s ON
sb.specbus_specid = s.spec_ID
ORDER BY s.spec_Sort, b.bus_Name
</cfquery>
<cfset specs = valuelist(rsGetSpecialties.spec_ID)>
<cfquery name="rsListSpecialties">
SELECT spec_ID,spec_Name
FROM tbl_specialties
WHERE spec_ID in(#specs#)
ORDER BY spec_Name
</cfquery>
<cfset middle = int(rsListSpecialties.recordcount/2)>
<cfset specs = valuelist(rsListSpecialties.spec_Name)>
<cfset middle = listgetat(#specs#,middle)>
then displayed like this...
<td valign="top" width="50%">
<cfoutput query="rsGetSpecialties" group="spec_Name">
<h2><a class="specialty" href="javascript;"
onclick="dwfaq_ToggleOMaticDisplay(this,'#spec_ID#');return
document.MM_returnValue">#spec_Name#</a></h2>
<div id="#spec_ID#" style="display:none">
<cfoutput><a
href="#request.details#?bus_ID=#bus_ID#">#bus_Name#
(#bus_PCity#, #bus_PState#)</a><br /></cfoutput>
</div>
*****This is the line that does the splitting *****
<cfif spec_Name EQ middle></td><td
valign="top" width="50%"></cfif>
</cfoutput>
</td>
As for removing the extraneous cfoutput --> I thought that
I needed that in order to show the material within the grouped
data. HOw does CF know what data to repeat and what data to not
repeat in a grouped output? I will have to look this one up some
more.
thanks for the help

Similar Messages

  • How to dump block and identify the bytes stored for each column

    SQL> select header_file, header_block
    2 from dba_segments
    3 where segment_name = 'APARTMENTS';
    HEADER_FIL HEADER_BLO
    4 1692
    1 row selected.
    SQL> alter system dump datafile 4 block 1693;
    Statement processed.
    How can I see the dump block and identify the bytes stored for each column?
    tab 0, row 0, @0x73b
    tl: 125 fb: H-FL lb: 0x1 cc: 4
    col 0: [25]
    52 65 64 77 6f 6f 64 20 53 68 6f 72 65 73 20 41 70 61 72 74 6d 65 6e 74 73
    col 1: [20] 00 54 00 01 02 08 00 00 00 01 00 00 00 01 00 00 00 00 1b 8d
    col 2: [53]
    00 54 00 01 02 0c 00 00 00 01 00 00 00 01 00 00 00 00 1b 8e 00 21 09 00 00
    00 00 00 00 11 00 00 00 00 00 01 45 6d 65 72 67 65 6e 63 79 20 44 65 74 61
    69 6c 73
    col 3: [20] 00 54 00 01 01 08 00 00 00 01 00 00 00 01 00 00 00 00 1b 8f

    SQL> select header_file, header_block
    2 from dba_segments
    3 where segment_name = 'APARTMENTS';
    HEADER_FIL HEADER_BLO
    4 1692
    1 row selected.
    SQL> alter system dump datafile 4 block 1693;
    Statement processed.
    How can I see the dump block and identify the bytes stored for each column?
    tab 0, row 0, @0x73b
    tl: 125 fb: H-FL lb: 0x1 cc: 4
    col 0: [25]
    52 65 64 77 6f 6f 64 20 53 68 6f 72 65 73 20 41 70 61 72 74 6d 65 6e 74 73
    col 1: [20] 00 54 00 01 02 08 00 00 00 01 00 00 00 01 00 00 00 00 1b 8d
    col 2: [53]
    00 54 00 01 02 0c 00 00 00 01 00 00 00 01 00 00 00 00 1b 8e 00 21 09 00 00
    00 00 00 00 11 00 00 00 00 00 01 45 6d 65 72 67 65 6e 63 79 20 44 65 74 61
    69 6c 73
    col 3: [20] 00 54 00 01 01 08 00 00 00 01 00 00 00 01 00 00 00 00 1b 8f

  • How to count and display the number of records in a database table

    My webpage has a list of items and their details, every item has a button
    Read / Make comments that loads the item in its own page displaying
    a comments form and previous comments.
    This is all working fine.
    I would like to add to each item information stating how many comments have
    been made about that item.
    Allowing the user to see before hand if it is worth while clicking on the
    Read / Make comments button.
    Ideally each item will have a different number of comments.
    The problem I have is outputing the number of comments associated with each item.
    My comments table is called guest my items table is called titles.
    I'm sure mysql statement is correct -
    The table guest currently has 7 comments,
    Item 1 has 3 comments
    Item 2 has 2 comments
    Item 3 has 1 comment
    Item 4 has 1 comment
    When I test the query in dreamweaver
    $Recordset1 = "SELECT COUNT(guest.software_id) as COUNT, titles.id FROM titles LEFT JOIN guest ON titles.id = guest.software_id GROUP BY guest.software_id";
    the outoput is a list showing 2, 3, 1, 1
    My problem is, getting the totals into my repeat region.
    I tried the following line
    <td align="left" valign="top" bgcolor="#e5f8cb">Current comments:<?php echo $row_Recordset1['COUNT']; ?></td>
    resulting in all comments so far displaying 0
    I have highlighted in bold the parts that I am having difficulty with.
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $colname_rsTitles = "-1";
    if (isset($_GET['id'])) {
      $colname_rsTitles = $_GET['id'];
    mysql_select_db($database_abe, $abe);
    $query_rsTitles = sprintf("SELECT title, company, `description`, resources, location, url, image, keyword, copies FROM titles WHERE id = %s ORDER BY id ASC", GetSQLValueString($colname_rsTitles, "int"));
    $rsTitles = mysql_query($query_rsTitles, $abe) or die(mysql_error());
    $row_rsTitles = mysql_fetch_assoc($rsTitles);
    $totalRows_rsTitles = "-1";
    if (isset($_GET['id'])) {
      $totalRows_rsTitles = $_GET['id'];
    $colname_rsTitles = "-1";
    mysql_select_db($database_abe, $abe);
    $query_rsTitles = sprintf("SELECT title, company, `description`, resources, location, url, image, keyword, copies FROM titles WHERE id = %s ORDER BY id ASC", GetSQLValueString($colname_rsTitles, "int"));
    $rsTitles = mysql_query($query_rsTitles, $abe) or die(mysql_error());
    $row_rsTitles = mysql_fetch_assoc($rsTitles);
    $totalRows_rsTitles = mysql_num_rows($rsTitles);
    mysql_select_db($database_abe, $abe);
    $query_rs_comments = "SELECT * FROM guest";
    $rs_comments = mysql_query($query_rs_comments, $abe) or die(mysql_error());
    $row_rs_comments = mysql_fetch_assoc($rs_comments);
    $totalRows_rs_comments = mysql_num_rows($rs_comments);
    mysql_select_db($database_abe, $abe);
    $query_rs_users = "SELECT * FROM users";
    $rs_users = mysql_query($query_rs_users, $abe) or die(mysql_error());
    $row_rs_users = mysql_fetch_assoc($rs_users);
    $totalRows_rs_users = mysql_num_rows($rs_users);
    mysql_select_db($database_abe, $abe);
    $query_Recordset1 = "SELECT COUNT(guest.software_id) as COUNT, titles.id FROM titles LEFT JOIN guest ON titles.id = guest.software_id GROUP BY guest.software_id";
    $Recordset1 = mysql_query($query_Recordset1, $abe) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    mysql_select_db($database_abe, $abe);
    if(!isset($_POST['softwareLevel'])){
    if (!isset($_GET['class_id'])) {
    //show all software titles
    $query_rsTitles = "SELECT id, title, company, `description`, resources, location, url, image, keyword, copies FROM titles ORDER BY id ASC";
    }else{
    //show software titles filtered by Literacy of Numeracy (using URL GET variable)
    $query_rsTitles = "SELECT id, title, company, `description`, resources, location, url, image, keyword, copies FROM titles WHERE titles.class_id = ". GetSQLValueString($_GET['class_id'], "int") ." ORDER BY id ASC";
    }else{
    //show software titles filtered by Level (using Form POST variable)
    $query_rsTitles = "SELECT id, title, company, `description`, resources, location, url, image, keyword, copies FROM titles WHERE titles.level_id = ". GetSQLValueString($_POST['softwareLevel'], "int") ." ORDER BY id ASC";
    $rsTitles = mysql_query($query_rsTitles, $abe) or die(mysql_error());
    $row_rsTitles = mysql_fetch_assoc($rsTitles);
    $totalRows_rsTitles = mysql_num_rows($rsTitles);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <?php $pagetitle="ABE Software Locator"?>
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?php echo $pagetitle ?></title>
    <link rel="stylesheet" href="../../includes/styles.css" type="text/css" media="screen" />
    <style type="text/css">
    body {
    background-color: #FFF;
    </style>
    </head>
    <body>
    <?php include("../../includes/header.php"); ?>
        <div><table width="70%" border="0" align="center" cellpadding="3" cellspacing="0">
      <tr>
        <td width="29%" height="50" align="center"><a href="software_detail.php">Back to Locator</a></td>
        <td width="50%" align="center"><a href="../../index.php">Welcome Page</a></td>
        <td width="21%" align="center"><a href="../../logout.php">Log Out</a></td>
      </tr>
      <tr>
        <td colspan="3" align="center"><strong> There Are <span class="totalrecordsnumber"><?php echo $totalRows_rsTitles ?></span>  Software Titles Listed</strong></td>
      </tr>
      <tr>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
    </table>
        <?php do { ?>
          <table width="820" border="0" align="center" cellpadding="3" cellspacing="2">
            <tr>
              <td width="206" height="200" rowspan="3" align="center" bgcolor="#FFFFFF"><img src="images/<?php echo $row_rsTitles['image']; ?>" alt="<?php echo $row_rsTitles['title']; ?>" /></td>
              <td colspan="3" align="center" bgcolor="#086b50"><h2><?php echo $row_rsTitles['title']; ?></h2></td>
            </tr>
            <tr>
              <td colspan="3" align="center" bgcolor="#f6b824"><strong>Made by:</strong> <?php echo $row_rsTitles['company']; ?></td>
            </tr>
            <tr>
              <td colspan="3" align="left" valign="top" bgcolor="#e5f8cb"><p class="ptaglineheight"><strong>Description: </strong><?php echo $row_rsTitles['description']; ?></p></td>
            </tr>
            <tr>
              <td colspan="2" align="left" valign="top" bgcolor="#e5f8cb"><span class="tabletext"><strong>Keywords</strong></span><strong>: </strong><?php echo $row_rsTitles['keyword']; ?></td>
              <td colspan="2" align="left" valign="top" bgcolor="#e5f8cb"><strong>Resources:</strong> <?php echo $row_rsTitles['resources']; ?></td>
            </tr>
            <tr>
              <td colspan="4" align="left" valign="top" bgcolor="#e5f8cb"><strong>Web Address:</strong> <a href="<?php echo $row_rsTitles['url']; ?>" target="_blank"><?php echo $row_rsTitles['url']; ?></a></td>
            </tr>
            <tr>
              <td colspan="3" align="left" valign="top" bgcolor="#e5f8cb"><strong>Is installed on:</strong> <?php echo $row_rsTitles['location']; ?></td>
              <td width="195" align="left" valign="top" bgcolor="#e5f8cb"><strong>Copies available:</strong><?php echo $row_rsTitles['copies']; ?></td>
            </tr>
            <tr>
              <td colspan="3" align="left" valign="top" bgcolor="#e5f8cb"><a href="fulltitle.php?software_id=<?php echo $row_rsTitles['id']; ?>&amp;id=<?php echo $row_rsTitles['id']; ?>">Read / Make Comments About This Software</a></td>
              <td align="left" valign="top" bgcolor="#e5f8cb">Current comments:<?php echo $row_Recordset1['COUNT']; ?></td>
            </tr>
          </table> 
          <br />
          <?php } while ($row_rsTitles = mysql_fetch_assoc($rsTitles)); ?>
        </div>
        <?php include("../../includes/footer.php"); ?>
    </body>
    </html>
    <?php
    mysql_free_result($rsTitles);
    mysql_free_result($rs_comments);
    mysql_free_result($rs_users);
    mysql_free_result($Recordset1);

    I changed the mysql as you suggested GROUP BY titles.id
    and added a while loop to iterate over the data
    mysql_select_db($database_abe, $abe);
    $query_Recordset1 = "SELECT COUNT(guest.software_id) as COUNT, titles.id FROM titles LEFT JOIN guest ON titles.id = guest.software_id GROUP BY titles.id";
    $Recordset1 = mysql_query($query_Recordset1, $abe) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    $row_Recordset1 = mysql_query($query_Recordset1) or die(mysql_error());
    <td>Current comments:<?php
    if($row_Recordset1)
    while($row = mysql_fetch_array($row_Recordset1))
    echo $row['COUNT'];
    } ?></td>
    The first item now displays the following,
    comments:2311000000000000000000000000000
    all others
    comments:
    the number matched the database table exactly, 30 records 4 of which have 2, 3, 1, 1 comments.
    It looks as if the problem is trying to get the repeat region to pick up on it!

  • Count and limit the accesses to a browser based swf

    I have a swf file imbedded in a HTML. Acceess to the file are controlled by passwords, stored in a XML-file
    I want to limit the number of accesses for each visitor to let us say 10 visits. How do I count (and store) the number of logons for each visitor?
    SharedObject works only at clienside, but iI want i serverside. The "easy" way would be to save the number of accesses for each visitor in a text-file but Flash and save... I hvave tried ExternalInterface calls, PHP etc and etc, but cant find a way that works. This is the last obstacle in a huge project. Please help.

    If using a MySQL database is an option, here's a link to a tutorial that deals with all the various aspects of that.
    http://www.gotoandlearn.com/play?id=20

  • How to identify the number of clients in server

    Hai
    Iam trying a network program to identify the number of clients which accessing the server. I dont no how to identify the number of clients which accessing the server through server machine. I want to identify the client machine ip or name. If you have any idea help for me.
    Regards
    A.KRaj

    You can keep a ArrayList of active connections and store the IP address of the incoming connection in the Server. You have to do this everytime you accept a connection.

  • I reseted my ipone and removed the number how can i get it back

    i reseted my ipone and removed the number how can i get it back

    Two solutions come to mind:
    Use your phone to call someone, and have that person use Caller ID to tell you your phone number.
    Contact your cellular carrier.  Here's how: Contact a mobile carrier

  • What does "on my mac' mean and how do i delete or reduce the number of items in there?

    What does "on my mac" mean and how do i delete or reduce the number?

    Hi ya
    I'm seeing this on my email screen, on the left hand side - under the "RSS Apple".  The number of items in there is now 752.  It's preventing me from sending and receiving emails in my AOL account.
    Any  help would be deeply appreciated.
    Thank you.

  • HT201269 If I want to take my old iPhone and swap the number from my wife's phone to it so she can use it for her phone how do I do it?

    If I want to take my old iPhone and swap the number from my wife's phone to it so she can use it for her phone how do I do it?

    With AT&T it's ridiculously easy. 
    Create backups for each device
    Log out of iCloud Apple ID
    Erase all content and settings
    Power off the devices
    Change the SIM
    Power on the device
    Configure with the appropriate Apple ID
    Finally, dial 611 to let AT&T know what iPhone should answer to what number.

  • Use Windows PowerShell to count and list total number of items in Folders E-Mail in Office Outlook?

    I have the need to generate a list of all outlook folders and the total number of items listed beside each folder name. I thought I could simply modify the script from " http://blogs.technet.com/b/heyscriptingguy/archive/2009/01/26/how-do-i-use-windows-powershell-to-work-with-junk-e-mail-in-office-outlook.aspx
    " regarding the total number of items in the junk folder but no luck.
    I thought I could just simply duplicate line 6 of the aforementioned script
    "$folder = $namespace.getDefaultFolder($olFolders::olFolderJunk) " and change the folder name but getting the "Method invocation failed because [Microsoft.Office.Interop.Outlook.OlDefaultFolders] does not contain a method
    named 'olFolder'.
    At line:7 char:1
    + $folder = $namespace.getCurrentFolder($olFolders::olFolder("Design Engineering S ...
    I've found a way to export a list of all these folders using exportoutlookfolders.vbs to a txt file but doesn't include total number of items.
    Looking for any pointers on how to make this work. Don't expect anyone to write it for me but I am still learning PS. Would be great to find a way to import all of these folder and subfolder names into the script. Will be appreciative of any advice though.
    There's an enormous amount of Outlook folders.
    Outlook 2013
    Windows 8
    Thanks,
    Barry

    Since I am not and administrator, but an end user, I do not have access to the Get-Mailxxxx commandlets to make this really easy and had to do this long hand.
      The following will pull folder.name, folder.items.count, and sum the total size of each folder's items for all folders and their subs. 
    Just one warning, the summation can take some time with a large PST file since it needs to read every email in the PST. 
    There is also some minor formatting added to make the results a little more readable.
    $o
    = new-object
    -comobject outlook.application 
    $n
    = $o.GetNamespace("MAPI") 
    $f
    = $n.GetDefaultFolder(6).Parent 
    $i
    = 0
    $folder
    = $f
    # Create a function that can be used and then re used to find your folders
    Function
    Get-Folders()
    {Param($folder)
     foreach($folder
    in $folder.Folders)   
    {$Size =
    0
    $Itemcount
    = 0
    $foldername
    = $folder.name
    #Pull the number of items in the folder
    $folderItemCount
    = $folder.items.count
    #Sum the item (email) sizes up to give the total size of the folder
    foreach ($item
    in $folder.Items)
    {$Itemcount
    = $Itemcount
    + 1
    $Size =
    $Size +
    $item.size
    Write-Progress -Activity ("Toting size of "
    + $foldername
    + " folder.")
    -Status ("Totaling size of "
    + $Itemcount
    + " of "
    + $folderItemCount
    + " emails.")
    -PercentComplete ($itemcount/$folderItemCount*100)
    # just a little formating of the folder name for ease of display
    While($foldername.length
    -le 19){$foldername
    = $foldername
    + " "}
    #Write the results to the window
    Write-Host ("-folder "
    + $foldername
    + "  
    -itemcount " +
    "{0,7:N0}" -f
    $folderItemCount +
    "   -size " +
    "{0,8:N0}" -f ($size/1024)
    + " KB")
    #If the folder has a sub folder then loop threw the Get-Folders function.
    #This two lines of code is what allows you to find all sub folders, and
    #sub sub folders, and sub sub sub for as many times as is needed.
    If($folder.folders.count
    -gt 0)
    {Get-Folders($folder)}
    get-folders($folder)

  • On an iphone 4s, when I tap the phone number in my contacts list instead of calling the number it goes to a "Welcome to mail screen" how do I make it call the number instead?

    On an iphone 4s, when I tap the phone number in my contacts list instead of calling the number it goes to a "Welcome to mail" screen with icloud, Microsoft exchange, Gmail, Yahoo, Aol & Windows Live Hotmail listed beneath. How do I make it call the number instead?

    Never heard of that.  I suspect it thinks that's an email address and you're seeing that screen b/c you don't have an email account setup on your iPhone.
    Assuming the number is valid, try a reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.

  • Loop through a csv file and return the number of rows in it?

    What would be simplest way to loop through a csv file and
    return the number of rows in it?
    <cffile action="read" file="#filename#" output="#csvstr#"
    >
    <LOOP THROUGH AND COUNT ROWS>

    ListLen(). Use chr(13) as your delimiter

  • TS3899 how do i control or limit the number of email messages in my inbox?

    how do i control or limit the number of email messages in my inbox? i used to be able to pick the number of emails on my phone 100, 500, 1000, or 1500 etc. now all my (new inbox) emails are  coming to me at once. how can i control it? i have went through my entire phone and i cant find way to filter??? HELP

    That function was removed in iOS 7.

  • Need information for how to Capture, Transmit, and Identify a DTMF tone

    Hello every body
    I would like to implements the DTMF where i need some information that hoe i can
    1) Capture the tone mean when i press button 'one' it has to capture and generate a vaoice file.
    2) And i need to transmit the same thing to a remote system.
    3) At the remote system how i can reveive and identify that the tone is for 'one'.
    Thanks to ............. in advance
    Sreenath Kulkarni

    JMF isn't the right tool - it's about handling media streams
    You could use it to capture the audio source, then obtain the audio samples,
    But you would then have to perfom some signal processing on it to interpret/decode for tone detection
    This is what should already be available via the JTAPI API (haven't checked but should do this sort of thing)
    ie you should be able to code up an application that receives 'DTMF Tone' events & does whatever you need to do in response
    This is what IVR systems do

  • Identify the number server calls using java

    how to identify the number server calls that are made for rendering the page, Also have each call transmission data too.using java language.

    What??? What are you talking about? What environment? What server?

  • Reinstall Photoshop CS six bought it and have the number

    Re install Photoshop CS 6 bought it and have the number ,Not quite sure how to do it,Put the number in and it said it was wrong ,but it's not,  I wrote it down in two places.What to do?

    What specifically does the "it was wrong" message say?
    possible related links...
    Error "The serial number is not valid for this product" | Creative Suite
    http://helpx.adobe.com/creative-suite/kb/error-serial-number-valid-product.html
    Error "This serial number is not for a qualifying product" | CS6, CS5.5, CS5
    http://helpx.adobe.com/creative-suite/kb/error-serial-number-qualifying-product.html

Maybe you are looking for