Solved

Help converting from MS SQL

Posted on 2011-02-22
1
229 Views
Last Modified: 2012-06-27
I don't think some of these functions are available to mySQL.  I am new to using it and wonder if anyone can help.


Here is a much shortened version of the script.  I think it has to do wth the @@rowcount, begin, end syntax...


UPDATE bp_item
                                    SET ItemID=<cfqueryparam cfsqltype="cf_sql_varchar"  value="#thisItem.itemId[1]#">                        
                                    WHERE ItemID= '#thisItem.itemId[1]#'                        
                                    IF @@ROWCOUNT = 0
                                    BEGIN
                                          INSERT INTO item
                                                            (KeywordID)
                                                VALUES
                                                            (<cfqueryparam cfsqltype="cf_sql_integer"  value="#getNextKeywords.keyword_ID#">)
                                    END




Thank you
0
Comment
Question by:theideabulb
1 Comment
 
LVL 15

Accepted Solution

by:
pateljitu earned 500 total points
ID: 34957561
Please try this article which explain the use of FOUND_ROWS();

SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name WHERE id > 100;
SELECT FOUND_ROWS();

http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_found-rows
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question