Mysql Stored Procedure incorrect number of arguments

Source: Internet
Author: User
Tags mysql functions mysql tutorial

Mysql tutorial Stored Procedure incorrect number of arguments

Drop procedure 'chaxun _ name_ps tutorial '//
Create definer = 'root' @ 'localhost' PROCEDURE 'chaxun _ name_ps '(in c_id

Int, out c_phone char, out c_pwd char)
READS SQL DATA
Begin
Select phone, pwd
From caopanshou
Where id = 18;
Select found_rows () into c_phone, c_pwd;
End


Call Method

Call chaxun_name_ps (1, 1, 1)

Unknown Method

Select @ chaxun_name_ps ()

The return value is Null.


Some may not know the function of the found_rows () function.

Select count (*) from t mysql functions with the same functions found_rows

<? Php tutorial

$ SQL = "select count (*) from t ";

$ Res = mysql_query ($ SQL );

$ Num = mysql_result ($ res, 0 );

$ SQL = "select topic, detail from t limit 5 ";

// *** I will not write the following:

?>


However, use the built-in mysql function found_rows ();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.