Tags only return one result

I have tagged numerous bookmarks, but when I type the tag in the location (Awesome) bar, only one result is returned. I have disabled all themes and tried disabled most add-ons. Nothing helps.

If all else fails, you could use the JDBC driver for your
SELECTS and your
ODBCJDBC driver for INSERTS/UPDATES. It's a bit of a crap
approach, but at
least it'd work.
Beyond that, I can't be of any help, sorry. Maybe you could
revert to the
7.0.1 version of the ODBC driver?
Adam

Similar Messages

  • Database is only returns one result

    I'm trying to count the number of calls & low priorty call from my account table in my databate. There is only one call so far in it. Call = 1 but its priorty is Low so Low should also be 1. I have check my sql in the Database and it return 1 result but in my program Low still = 0.
    Connection conn;
    String theNoCallsSQL = "Select call_no From Call ";
    String thePLowSQL = "Select call_no From Call where priorty = 'Low' ";
    int NoCalls = 0;
    int Low = 0;
    ResultSet rsetNoCall;
    ResultSet rsetLow;
    rsetNoCall = stmt.executeQuery(theNoCallsSQL);
    while(rsetNoCall.next() == true)
    NoCalls ++;
    rsetLow = stmt.executeQuery(thePLowSQL);
    while(rsetLow.next() == true)
    Low ++;
    conn.close();
    ArrayList myStatsList = new ArrayList();
    CallsStats myStats = new CallsStats();
    myStats.setNoCall(NoCalls);
    myStats.setNoLow(Low);
    return myStatsList;

    Haven't you heard about debugging? The simplest forum of debugging to answer your question would be to insert a line like this:System.out.println("Low++ executed");immediately before the line that saysLow++;Or you could use System.out to display the value of Low immediately beforemyStats.setNoLow(Low);The possibilities are endless.

  • Jdbc:odbc bridge only returning one result when a count show 148 !

    Hello,
    Am sure i have done something stupid, but i have an issue with jdbc:odbc ....
    It is a simple sceanrio that i have coded umpteen times before ...
    I have the following ....
    1. Connection to DB2 on an IBM i5 (I apologise for not using native drivers from jt400.jar, but i had an ODBC code example and was in a rush - no excuse i know)
    2. Statement object created from connection above
    3. A string with my SQL in it
    4. A result set for the results.
    These are created as follows:
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection(ODBCSource, userID, password);
    if (con == null) {
    // error handling not relevant here
    } else {
    Statement s = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
    String SQL = "select * from table";                    
    ResultSet rs = s.executeQuery(SQL);
    i then try to loop ....
    while (rs.next() )
    // stuff
    however, i only ever get one result .... if i stick in the check for isLast, the first loop hits this check, i get my little status message, and the loop ends.
    while (rs.next() )
    if (rs.isLast() )
    System.out.println("I am on last record");
    BUT if i run the SQL
    "select count(*) from table" ... i get a count of 148 !!
    I tried setting the FetchSize through setFetchSize(), but made no difference.
    This is running on a JBoss server 4.2.1GA, JDK is "jdk1.6.0_02" .... i have a suspicion that this may be a JBoss specfic issue, as this exact code runs just fine on the Domino platform that it was originally on, if this is the case, i apologise for wasting everyones time .... but would still appreciate any pointers you can give me.
    Cheers

    sorry .... just relaised this is in the wrong forum ... reposted in the Database connectivity forum !!

  • Returning one result

    Ok. So, here is my issue, I am running a query on an oracle 10 database, through pl/sql developer. The result set returns something like this:
    ID Code
    A 001-012
    A 001-021
    A 001-032
    A 001-043
    B 001-023
    B 001-054
    B 001-003
    B 001-002
    B 001-007
    I would like it to return this
    ID Code
    A 001-012
    B 001-054
    The "Code"(ex. 001-043) does not matter, only has to return one for each ID (ex. A), but has to return every unique ID. The problem with it is that there is no one common "Code" for each "ID".
    I am sure this makes absolutely no sense...but if it does, and someone out there has any suggestions..would greatly appreciate it :)

    Shamrock wrote:
    N Gasparotto wrote:
    Shamrock wrote:
    I would like it to return this
    ID Code
    A 001-012
    B 001-054Why those two rows and not others instead ?
    I mean, why not the two following ones ?
    A 001-021
    B 001-003
    Are they getting randomly ?
    Nicolas.That's the thing, it doesn't matter which row it picks, as long as it only returns one row for each ID. That's why I am struggling I think
    Edited by: Shamrock on Jun 16, 2010 7:10 AMIf it doesn't matter which "code" it returns with the distinct "id", why select the "code" in the first place. You just said, in effect, it is meaningless.
    just SELECT DISTINCT ID ....

  • How come Java methods can only return one variable?

    Hi,
    I am just curious, how come C/C++/Java methods/functions can only return one argument but can accept many parameters.
    I know that the workaround is to return an object, but sometimes creating a class is just too much overhead.
    Thank you in advance.

    Hello,
    It's an interesting discussion. To get the full answer to your question, you'd have to consult the library and find books on programming language design and implementation.
    I believe the tradition goes all the way back to the first programming languages having subroutines/procedures/functions/methods in them: you can return nothing at all (void i Java) or a single value. The need for returning a single value, I guess, comes from the wish to embed calls in arithmetic expressions:
      res = 2 * someObject.foo(x) - anotherObj.bar(a,b);To my knowledge, few languages allow you to return more values. One that does is BETA (see www.daimi.au.dk/~beta/). Though not indispensable, it's convenient sometimes. I don't know why it's not more widespread.
    Yours,
    Ole

  • Result Set only returning one row...

    When I run the following query in my program, I only get one row.
    SELECT * FROM (SELECT * FROM ul_common_log_event WHERE application_name = 'Configuration' ORDER BY cle_id DESC) WHERE ROWNUM <= 500;
    However when I run it in TOAD, I get all the rows I am looking for.
    Here's my java
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(query);
    My record set only contain one row. I am using Oracle 9 OCI driver BTW.
    Any ideas? Thanks!

    Good thinking. That was the first thing I tried. That was not the problem. It turns out that I was stomping my rs object in another method. Problem resolved!
    Thanks for the reply!

  • CS_WHERE_USED_MAT only returns one level

    Hi all,
    I need to get the results that CS15 (where-used) gives me when multi-level is checked.
    I need to write a program and was hoping to use FM CS_WHERE_USED_MAT.  However, this FM only returns the materials that are one level down.  I'm on 4.5b.
    Does anyone know what FM I can use that will give me the materials at all levels (like CS15 does).  I can use CS_WHERE_USED_MAT and feed back in each material until I reach the end of the levels.  But I was wondering if anyone has found a better way.
    Thanks,
    Mike

    you can refer link:[http://wiki.sdn.sap.com/wiki/display/Snippets/InverseBOMExplosion-ABAP]
    or use fm CS_BOM_EXPL_MAT_V2 pass X to field MEHRS

  • SEARCH (only returns one record?)

    When I run my search, it only returns the first record it finds. Can sombody give me a clue to why it won't return multipule records?
    try{
    //Connect to the Database
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con =
    DriverManager.getConnection("jdbc:odbc:ComfortZoneDB");
    Statement s = con.createStatement();
    String sql = "SELECT * from Hydronics WHERE Keyword LIKE '%"+field+"%' order by Keyword";
    //Contains results from the SQL Query
    ResultSet rs = s.executeQuery(sql);
    // Displays it all out in a table
    while (rs.next()) {
    txt_search1.setText(""+rs.getString(1)+ "|" rs.getString(2) "|"+rs.getString(3)+ "|"+rs.getString(4)+ "|"+rs.getString(5)+ "|"+rs.getString(6)+ "|"+rs.getString(7));
    rs.close();
    s.close();
    con.close();
    catch(SQLException e){
    catch(Exception e){ 
    }

    Sir,
    Slappy presents Table Models 101.
    import java.sql.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.util.*;
    public class SlappyReadOnlyTableModel{
      private LinkedList rows;
      private String[] colnames;
      private int[] coltypes;
      public SlappyReadOnlyTableModel(ResultSet rs)throws Exception{
        ResultSetMetaData rsmd = rs.getMetaData();
        colnames = new String[rsmd.getColumnCount()];
        coltypes = new int[rsmd.getColumnCount()];
        for(int i=0;i<colnames.length;i++){
          colnames[i] = rsmd.getColumnLabel(i+1);
          coltypes[i] = rsmd.getColumnType(i+1);
        rows = new LinkedList();
        // this bit checks the cursor position. if not at the start we move it there IF we can
        if(!rs.isBeforeFirst()){
          if(rs.getType()!=ResultSet.TYPE_FORWARD_ONLY){
            rs.beforeFirst();
        while(rs.next()){
          Object[] arow = new Object[colnames.length];
          for(int i=0;i<arow.length;i++){
            switch(coltypes){
    case Types.BOOLEAN:
    arow[i] = new Boolean(rs.getBoolean(i+1));
    break;
    case Types.DATE:
    arow[i] = rs.getDate(i+1);
    break;
    case Types.INTEGER:
    arow[i] = new Integer(rs.getInt(i+1));
    break;
    case Types.DOUBLE:
    arow[i] = new Double(rs.getDouble(i+1));
    break;
    // I have left out many cases. Adjust as required.
    default:
    arow[i] = rs.getString(i+1);
    rows.add(arow);
    public int getRowCount(){
    return rows.size();
    public int getColumnCount(){
    return colnames.length;
    public Object getValueAt(int row, int column){
    Object[] arow = (Object[]) rows.get(row);
    return arow[column];
    public boolean isCellEditable(int row, int column){
    return false;
    public String getColumnName(int column){
    return colnames[column];
    Save that as SlappyReadOnlyTableModel.
    Then invoke in your code like this...
    ResulSet rs = // whereever you get result set from.
    SlappyReadOnlyTableModel tm = new SlappyReadOnlyTableModel(rs);
    rs.close();
    JTable display = new JTable(tm);
    // now add your table where you likeToday was your lucky day. Please use the API and look at the tutorial for more. http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    Sincerely,
    Slappy

  • PreparedStatement only returning 256 results

    Hi!
    I'm working on a project where the user can enter up to 1000 ids to fetch the corresponding objects from our Oracle database, connected using the 11.1.0.7.0 jdbc drivers. However, only 256 rows were available in the result. So I made a simple test, like so:
    public static void main(String[] args) throws Exception {         Class.forName("oracle.jdbc.OracleDriver");         Connection connection = DriverManager.getConnection("jdbc:oracle:thin:myuser/mypassword@myurl:1521:mydb");     PreparedStatement select = connection.prepareStatement("SELECT id FROM t01abc_regenh WHERE id in (?, ?,..., ?)"); // 1000 ?s         String[] idArray = new String[] {"010000010", "010000026", ..., "010000981"}; // 1000 ids         for(int i = 0; i<idArray.length; i++) {       select.setString(i+1, idArray);
    ResultSet result = select.executeQuery();
    boolean hasNext = result.next();
    for(int i = 1; hasNext; i++) {
    System.out.println(i + " : " + result.getString(1));
    hasNext = result.next();
    result.close();
    select.close();
    connection.close();
    The database logs show that the query is using the 1000 ids, but only the first 256 results were printed. So I tried again, using a non-prepared statement:
    public static void main(String[] args) throws Exception {
    Class.forName("oracle.jdbc.OracleDriver");
    Connection connection = DriverManager.getConnection("jdbc:oracle:thin:myuser/mypassword@myurl:1521:mydb");
    Statement select = connection.createStatement();
    String[] idArray = new String[] {"010000010", "010000026", ..., "010000981"}; // 1000 ids
    StringBuilder query = new StringBuilder("SELECT id FROM t01abc_regenh WHERE id in (");
    for(int i = 0; i<idArray.length; i++) {
    query.append('\'').append(idArray[i]).append("', ");
    query.delete(query.length() - 2, query.length());
    query.append(')');
    ResultSet result = select.executeQuery(query.toString());
    boolean hasNext = result.next();
    for(int i = 1; hasNext; i++) {
    System.out.println(i + " : " + result.getString(1));
    hasNext = result.next();
    result.close();
    select.close();
    connection.close();
    This time the full 1000 results where printed. Is this a general thing with prepared statements or is it an issue with the Oracle database or the jdbc drivers? Is there a way to increase the number of returned results? Please help!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    >
    Is this a general thing with prepared statements or is it an issue with the Oracle database or the jdbc drivers?
    >
    None of the above - it is an issue with your code. You are comparing apples to oranges; an invalid comparison.
    The queries are not identical so you should not expect identical results.
    You are using this data
        String[] idArray = new String[] {"010000010", "010000026", ..., "010000981"}; // 1000 idsin two different queries.
    The first test constructs a query of the form
        "SELECT id FROM t01abc_regenh WHERE id in (010000010, 010000026,..., ?)"); // 1000 ?sAnd the second constructs a query of the form
        "SELECT id FROM t01abc_regenh WHERE id in ('010000010', '010000026',..., ?)"); // 1000 ?sThat is the first query uses numeric values for the IN clause and the second query uses string values.
    If the actual data is VARCHAR2 these will not match the same values.
    A string value of '010000010' will not match a numeric value of 010000010 because when 010000010 is converted back to a string for the comparison there will be no leading zeroes so the converted value will be '10000010'
    So the first query tries to match '010000010' with '10000010' and they do not match.

  • 11g HS ODBC database link only returning one column

    Hi,
    We having a problem with a HS ODBC database link to a SQLServer database - only one column is being returned (when we do a simple 'select * from remote_table@SQLServer_dblink'). We recently set up another HS database link to a MySQL database and that's works okay, even though the init*.ora files have the same settings configured.
    Any ideas what might cause this?
    This is the trace file:
    Oracle Corporation --- FRIDAY OCT 28 2011 14:26:33.827
    Heterogeneous Agent Release
    11.2.0.2.0
    Oracle Corporation --- FRIDAY OCT 28 2011 14:26:33.827
    Version 11.2.0.2.0
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "ON"
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib/libodbc.so"
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using MySQL_CSSUser as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    hgocont, line 2754: calling SqlDriverConnect got sqlstate I

    The characterset on our Oracle DB is AL16UTF16, but we have already tried several language settings without success (see commented out sections in the *.ora file below) - but interestingly not a UTF16. Is that the problem, do you think?
    The collation on the SQLServer DB is 'SQL_Latin1_General_CP1_CI_AS', if that makes any difference. The db server is Linux (5.6), Oracle db is 11.0.2.0 and the SQLServer db is v.8.
    We don't get an error when using the dblink...it's just that only the last column is returned. If we explicitly select any other columns, we get the 'invalid identifier' error. It's the same with whatever table we dblink to...the columns are just standard chars and numerics, nothing large or custom, etc.
    I'll try and dig up the full trace file....
    HS_FDS_CONNECT_INFO=CSS_ST
    set ODBCINI=/etc/odbc.ini
    HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_SHAREABLE_NAME = /usr/lib/libodbc.so
    HS_FDS_SQLLEN_INTERPRETATION=32
    #HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1
    #HS_LANGUAGE=AMERICAN_AMERICA.WE8MSWIN1252
    #HS_LANGUAGE=AMERICAN_AMERICA.UTF8
    set ODBCINSTINI=/etc/odbcinst.ini
    set LD_LIBRARY_PATH=/usr/local/easysoft/lib:/usr/local/easysoft/sqlserver/lib:/usr/lib:/u01/app/oracle/product/11.2.0/dbhome_1/lib
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Apple 2 tv only shows one result for a tv series search

    Only one item is listed when I search for tv shows or movies

    One episode? One Season? One show?
    Sorry, not quite following what you're issue is.
    Do you get the same results with a search in iTunes on a PC/Mac?
    AC

  • Trigger and Gate Only Returns One Channel

    Hello all,
    I am trying to write a VI that will run in the background and start writing some data to a file when it detects a signal. For detecting the signal, the VI uses the "Trigger and Gate" express VI to see when the input voltage goes above a treshhold. Then I plan to write whatever data comes out of the "Triggered Signal" output.
    There are 8 channels, with the 6th one being the channel that is being checked for a signal. I have configured the "Trigger and Gate" express VI to trigger when that channel reaches 0.01 V and it does trigger when that happens. However the problem is that the "Triggered Signal" output only contains data for the first channel, and I want it to contain all of the channels.
    I don't have access to the device that will be sending the data right now, so I am testing the VI using the "Read From Measurements File" express VI. It reads from a file that contains data that I saved from the device previously. When I set the the "Retrieve segments of specified size" for the express VI, so I can see how it progresses, I get the error I mentioned above. When I set it to "Retrieve segments of original size" (the file contains only 1 segment, so it reads all data), everything works as expected.
    Any ideas as to what I am doing wrong?
    I attached the VI with some sample data.
    Attachments:
    data.csv ‏4834 KB
    trigger-and-gate.vi ‏112 KB

    Hi krizka,
    There are two really good examples that can be found using the NI Example Finder (help -> find examples). These are under Hardware Input and Output -> Analog Measurements -> Voltage  
    Cont Acq&Graph Voltage-Int Clk-Analog Start.vi
    Cont Acq&Graph Voltage-Write Data to File (TDMS).vi 
    These will give you a good start point. Please feel free to ask if you have any questions
    Joe Daily
    National Instruments
    Applications Engineer
    may the G be with you ....

  • Search feature in outlook only returning "no results" all of a sudden.  Why?

    I use outlook for my mail.  all of a sudden, the search feature just returns a "no results" solution.  Any ideas why?

    Options > Privacy = un-check '''Permanent Private Browsing Mode'''

  • Output of piped array only showing one result

    I thought what I was doing was pretty simple, but I am a bit stumped on what is happening here. First, I have an XML document I am importing. Here is a sample of the XML
    <Sites>
    <Site Url="http://sharepoint/personal/joe" />
    <Site Url="http://sharepoint/personal/mary" />
    <Site Url="http://sharepoint/personal/nick" />
    <Site Url="http://sharepoint/personal/walter" />
    </Sites>
    The output I want to achieve through PowerShell is just a list of the user names: joe, mary, nick, and walter
    Here is my PowerShell
    [xml]$MySites = Get-Content C:\Sites.xml
    $MySites.Sites.Site | Select Url | Out-String | % { $_.Substring($_.LastIndexOf("/")+1)}
    This code only outputs 'walter'. If I remove the last part of the pipe and just run this
    [xml]$MySites = Get-Content C:\Sites.xml
    $MySites.Sites.Site | Select Url | Out-String
    then the output is everything as expected, but as the full URL. I have also tried changing the code a bit to this
    [xml]$MySites = Get-Content "C:\Sites.xml"
    $Users = $MySites.Sites.Site | Select Url | Out-String
    foreach ($user in $Users) {
    $user.Substring($user.LastIndexOf("/")+1)
    But this still just gives me 'walter'.
    Any ideas why a substring would change the output of an array like this?

    You aren't creating an array. You are giving the variable a string. Pipe $Users to Get-Member to see that it is a string.
    Here is an alternate way to do what you want
    Split-Path (([xml](Get-Content "C:\Sites.xml")).Sites.Site.Url) -Leaf

  • Query that only returns items that will produce a result

    Thanks to Mack for his help yesterday.  I would really appreciate some help from anyone who is more SQL competent than I am.  I have an SQL problem that is just completely over my head.  I've created a nifty tagging system for the blog, that sorts by tags and by multiple tags, check out the beta here: http://committedsardine.com/blog.cfm
    When a user selects a tag, it adds it to the value list SESSION.blogTags.  If the selected tag is there already, it removes it.  When the list for tags pops up, I output all the tags, and show their state.  You'll see what I mean if you try it.
    What this leads to is the ability to select a group of tags for which there are no query results.  What I want to do is only show those that will generate results and how many results they'll show.  Like this, select "fluency" by itself there are 310 entries
    fluency (310) | digital (234) | writing (12)
    Once fluency is selected, there are 13 articles that ALSO are tagged by "digital", but none that are tagged by writing:
    fluency | digital (12) | writing
    I have a table called blogTagLinks, that is just for tying a tag to a blog.  It lists a blogID and a tagID.  Here is a sample of it for reference:
    blogTagLinkID
    blogID
    tagID
    4
    2
    2
    5
    2
    3
    6
    2
    5
    39
    1
    18
    49
    1
    1
    42
    1
    9
    44
    1
    19
    47
    5
    14
    48
    1
    22
    54
    16
    22
    I'm including all my sql, but the spot that I need help with is marked in red below:
    <!---if URL.tg is defined, check to see if it exists in the database, then the SESSION, and either add or delete it from SESSION--->
    <cfquery name="rsAllTags" datasource="">
    SELECT tagsID, tagName
            FROM tags
            WHERE tagActive = 'y'
    </cfquery>
    <cfset allTags = ValueList(rsAllTags.tagsID)>
    <cfif isDefined("URL.blogTags")>
        <cfif ListFind(allTags, URL.blogTags) NEQ 0>
            <cfif ListFind(SESSION.blogTags, URL.blogTags) NEQ 0>
                <cfset SESSION.blogTags = ListDeleteAt(SESSION.blogTags, ListFind(SESSION.blogTags, URL.blogTags))>
                <cfelse>
                <cfset SESSION.blogTags = ListAppend(SESSION.blogTags, URL.blogTags)>
            </cfif>
        </cfif>
    </cfif>
    <!---get a list of all available tags, tags that if added to the already selected tags, will return a result--->
    <cfquery name="rsAvailableTags" datasource="">
    SELECT tagsID, tagName
            FROM tags
            WHERE tagActive = 'y'
            NEED SOME STATEMENT HERE OF BLOGTAGLINKS TO DETERMINE WHAT TAGS WILL PRODUCE A RESULT
    </cfquery>
    <!---if searching by tags, get a list of the currently selected tags for display, the 0 returns an empty result if there are no tags--->
    <cfif isDefined("SESSION.sb") AND SESSION.sb EQ "tg">
        <cfquery name="rsTags" datasource="">
            SELECT tags.tagName, tagsID
            FROM tags
            WHERE tagsID <cfif SESSION.blogTags NEQ "">IN(#SESSION.blogTags#)
            <cfelse> = 0</cfif>
        </cfquery>
        <cfset variables.newrow = false>
    </cfif>
    <!---get the information for the blogs list, filtered by keyword or tag if requested--->
    <cfquery name="rsBlog" datasource="">
        SELECT blog.blogID,
            blog.storyID,
            blog.blogDate,
            blogStories.storyID,
            blogStories.blogTitle,
            SUBSTRING(blogStories.blogBody,1,200) AS blogBody,
            images.imageName
        FROM blog, blogStories, images
        WHERE blog.storyID = blogStories.storyID AND images.imageID = blog.photoID AND blog.blogDate < "#todayDate#" AND blog.deleted = 'n'
    <cfif SESSION.sb EQ "kw">AND  CONCAT(blogStories.blogBody, blogStories.blogTitle) LIKE '%#SESSION.blogKeywords#%'</cfif>
        <cfif SESSION.sb EQ "tg" AND SESSION.blogTags NEQ "">
                AND  blog.blogID IN (
                SELECT blogID
                FROM blogTagLink
                <cfif SESSION.blogTags NEQ "">
                    WHERE tagID IN(<cfqueryparam cfsqltype="cf_sql_integer" value="#SESSION.blogTags#" list="true">)
                    GROUP BY blogID
                    HAVING count(tagID) = #ListLen( SESSION.blogTags )#)
                </cfif>
         </cfif>
    ORDER BY blog.blogDate DESC
    </cfquery>

    There might be a single query solution but here's a query that you
    will need to run for each tag in the database (cfloop over all the
    tags) and will give you the number of blogs that have the selected
    tags + the current tag
    SELECT Count(*) AS blog_count
    FROM (
        SELECT blogID
        FROM blogTagLink
        WHERE tagID IN(<cfqueryparam cfsqltype="cf_sql_integer"
    value="#SESSION.blogTags#" list="true">)
             OR tagID = #currentTagID#
        GROUP BY blogID
        HAVING count(tagID) = #ListLen( SESSION.blogTags )#
             OR count(tagID) = #ListLen( SESSION.blogTags )# + 1
        ) AS blogs
    Mack

Maybe you are looking for

  • Uploading footage from HDV camera

    I'm having trouble getting FCP to connect with my Sony HDR-FX1E in 1080i format but it will work in DV. Only problem is all my filming was done in 1080i format and i can't download it. i have tried almost every combination i can think of in Audio/vid

  • RMAN Script is not allocating channels

    I have a customer who is running a Solaris Server with Oracle 9i and is trying to backup using an RMAN script to define the channels to back up to through Networker. The script is as follows: run { allocate channel t1 type "sbt_tape"; allocate channe

  • Custom document over internet encoding

    Hi all! While trying to send a custom document over AS2, the payload encoding seems to be dependent on signing and encription: If the message is unencrypted and unsigned -- Payload is UTF-8 If the message is 3DES encrypted OR signed OR both signed an

  • Sitestudio + check out and open in native

    Hi All, I need to integrate site studio with CheckOutAndOpenInNative component. The scenarios is like this 1) From a sitestudio template i execute my custom service, this service looks in an application database and fetches name and APP_Unique id. 2)

  • How to communicate from java to excel?

    I need to pass data from java to excel such that it'll create a report. It should be able to handle images also. ie. I have a form which contains some data. I need to read the data from the form and export the data - in the same format in the form -