全局符号“$new_cat_id”的问题需要 merging3.pl 中明确的包名称
我想运行 merging3.pl。但总是有这样的错误:
全局符号“$new_cat_id”需要在 merging3.pl 第 2 行显式包名称 51. 全局符号“$new_cat_id”在 merging3.pl 第 2 行需要显式包名称 65. 由于编译错误,merging3.pl 的执行中止。
的部分
这是我的 merging3.pl # 获取方面/类别 我的$query_local1 =“从类别中选择id,category_name”; 我的 $query_local2 = "其中 id=$new_cat_id AND 已删除=0"; 我的 $query_local = $query_local1.$query_local2; 我的 $query_handle_local = $connect->prepare($query_local); $query_handle_local->execute();
我的($盖子,$lname); $query_handle_local->bind_columns(\$lid, \$lname); while ($query_handle_local->fetch()) {
# print "local name= "."$lname\n";
#if name composite with a slash, take only first word
$lname =~ s/\/[^\/]*//;
# Get global facets/categories
my $query_global = "SELECT id, category_name FROM category WHERE id=our $new_cat_id AND deleted=0";
my $query_handle_global = $connect->prepare($query_global);
$query_handle_global->execute();
谢谢,非常感谢!
I want to run the merging3.pl. but alway have errors like this:
Global symbol "$new_cat_id" requires explicit package name at merging3.pl line 2
51.
Global symbol "$new_cat_id" requires explicit package name at merging3.pl line 2
65.
Execution of merging3.pl aborted due to compilation errors.
This is that parts of my merging3.pl
# Get facets/categories
my $query_local1 = "SELECT id, category_name FROM category ";
my $query_local2 = "WHERE id=$new_cat_id AND deleted=0";
my $query_local = $query_local1.$query_local2;
my $query_handle_local = $connect->prepare($query_local);
$query_handle_local->execute();
my ($lid, $lname);
$query_handle_local->bind_columns(\$lid, \$lname);
while ($query_handle_local->fetch()) {
# print "local name= "."$lname\n";
#if name composite with a slash, take only first word
$lname =~ s/\/[^\/]*//;
# Get global facets/categories
my $query_global = "SELECT id, category_name FROM category WHERE id=our $new_cat_id AND deleted=0";
my $query_handle_global = $connect->prepare($query_global);
$query_handle_global->execute();
Thank you and Really appreciate it!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论