I have an issue that is driving me crazy right now. Yesterday I made a simple SP, it worked great then. Today, without any changes to the SP, it is not working at all. None of the SP works. I get the 1318 error code all the time. As I said, everything worked great yesterday.

我有一个让你疯狂的问题。昨天我制作了一个简单的SP,它的效果非常好。今天,如果不对SP进行任何更改,它根本不起作用。没有SP工作。我一直得到1318错误代码。正如我所说,昨天一切都很好。

DELIMITER $$ CREATE DEFINER=`local`@`localhost` PROCEDURE `get_username`(
OUT match_name VARCHAR(50), 
str_id INT(5)
)
BEGIN
SELECT username INTO match_name FROM members WHERE id = str_id;
END

Simple SP to retrieve the name behind a id that is called from the mysql client with:

简单的SP检索从mysql客户端调用的id后面的名称:

CALL get_username(37);

What am I missing here?

我在这里想念的是什么?

1 个解决方案

#1


3

`get_username`(
OUT match_name VARCHAR(50), 
str_id INT(5)
)

You need 2 parameters, you need to pass in a variable parameter for that output parameter

您需要2个参数,需要传入该输出参数的变量参数

更多相关文章

  1. MySQL数据库 prompt参数详解
  2. MyBatis排序时使用order by 动态参数时需要注意,用$而不是# 用$传
  3. 如果发现自己的mysql没有充分利用CPU该关注那些参数?
  4. 解析innodb status各项参数
  5. c语言把mysql数据库语句和变量封装为一个语句
  6. 如何将对象作为参数传播给函数?
  7. 如何在javascript函数中将URL编码为参数?
  8. 范围变量值的变化没有反映在我的字符串中
  9. 根据循环中的i改变函数中的参数

随机推荐

  1. RelativeLayout布局属性详解
  2. Android textview显示多行
  3. android drawBitmapMesh
  4. android 指南针
  5. Alert Dialog
  6. vue判断手机类型是安卓、微信或IOS
  7. Android RGB颜色查询对照表
  8. Exoplayer - HDCP test on Android
  9. Android:关于Configurations
  10. Unpack/repack ext4 Android system imag