Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8167705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:16:55+00:00 2026-06-06T20:16:55+00:00

PhpMyAdmin doesn’t accept the parameters id_jugador_IN inside the procedure. This is the procedure we’re

  • 0

PhpMyAdmin doesn’t accept the parameters “id_jugador_IN” inside the procedure.

This is the procedure we’re executing:

SET GLOBAL event_scheduler = 1;

use traviandatabase;

DELIMITER $$

DROP PROCEDURE IF EXISTS sp_monitoritzacio_jugador $$

CREATE PROCEDURE sp_monitoritzacio_jugador(IN id_jugador_IN INT(10))

BEGIN

    CREATE OR REPLACE 
    VIEW dades_ususari AS 
    SELECT j.nom AS jugador, j.sexe AS sexe, j.edat AS edat, j.correu AS correu, a.nom AS alianca, p.nom AS pais, c.nom_ciutat AS ciutat
    FROM jugador AS j
    JOIN alianca AS a
    JOIN pais AS p
    JOIN ciutat AS c
    ON j.id_jugador = id_jugador_IN
    GROUP BY id_jugador_IN;

END $$

DELIMITER ;

CALL sp_monitoritzacio_jugador(1);

And this is the table “jugador”:

DROP TABLE IF EXISTS `jugador`;
CREATE TABLE `jugador` (
  `id_jugador` int(10) NOT NULL AUTO_INCREMENT,
  `id_raca` int(10) NOT NULL,
  `id_pais` int(10) NOT NULL,
  `id_alianca` int(10) DEFAULT '0',
  `nom` varchar(20) NOT NULL,
  `sexe` enum('Home','Dona') NOT NULL,
  `edat` int(10) NOT NULL,
  `correu` varchar(20) NOT NULL,
  PRIMARY KEY (`id_jugador`),
  KEY `jugador-alianca` (`id_alianca`),
  KEY `id_pais` (`id_pais`),
  KEY `id_raca` (`id_raca`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

So it doesn’t stop displaying the same error:

MySQL said: 1351 – View’s SELECT contains a variable or parameter

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:16:59+00:00Added an answer on June 6, 2026 at 8:16 pm

    As you see – view cannot use variables, it is a limitation. You are trying to create a view with exact WHERE condition; construct the CREATE VIEW statement text firstly, then use prepared statements to execute the statement, it will help you. But, do you really need it, to create, create and create new view?

    EDIT: This is the content of the reference in the comment.

    Olexandr Melnyk A simple workaround for MySQL’s limitation on local variables usage in views is to use a function, which returns variable’s value:

    create function book_subject
    returns varchar(64) as
    return @book_subject;
    
    create view thematical_books as
    select title
    , author
    from books
    where subject = book_subject();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use phpmyadmin, and when entering this adress: www.mydomain.com/phpmyadmin a login page appears. Is
When I click my phpmyadmin page, it gives me this error: phpMyAdmin was unable
When I use phpMyAdmin to see my online tables, it uses collation method latin_swedish_ce.
I wonder if any other users of PhpMyAdmin for Mysql have come across this
I'm trying to copy info from Buddypress to Wordpress. This query works in PHPMyAdmin,
This query works when I input it through phpmyadmin. INSERT INTO conversation (user_id) VALUES
I'm experiencing a rather strange problem with foreign keys, namely this doesn't work as
Who use the feature Synchronize in PHPMyAdmin? Does it work? I've tried but it
I installed EasyPHP 5.3.6, opened PhpMyAdmin, created a new databased and set password for
I have a problem: on my server phpmyadmin doesn't work anymore. it offers the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.