User Profile

Collapse

Profile Sidebar

Collapse
justforfuntwt
justforfuntwt
Last Activity: Sep 4 '08, 12:56 AM
Joined: Jun 20 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • justforfuntwt
    replied to Stored procedure help please
    thanks alot, I just tried it all, and even though that would have brought up an error later on, there must be one earlier, truth is that i'm almost sure that when the first statement is executed there is a problem

    by just writing this minimalist procedure

    Code:
    DELIMITER //
    DROP PROCEDURE IF EXISTS INSERTDBsb//
    # MySQL returned an empty result set (i.e. zero rows).
    
    CREATE PROCEDURE INSERTDBsb(
    ...
    See more | Go to post

    Leave a comment:


  • justforfuntwt
    replied to Stored procedure help please
    ok so in the end I have this:
    Code:
    DELIMITER //
    DROP PROCEDURE IF EXISTS INSERTDBsb//
    CREATE PROCEDURE INSERTDBsb( IN p_email varchar(160) , IN p_tablename varchar(80) , IN p_timestamp varchar(30) , IN p_data double)
    BEGIN
    DECLARE maxid bigint(20);
    DECLARE userid bigint(20);
    SET @s = CONCAT('SELECT @maxid:=max(_id) from ', p_tablename);
    PREPARE stmt FROM @s;
    EXECUTE stmt;
    ...
    See more | Go to post

    Leave a comment:


  • justforfuntwt
    replied to Stored procedure help please
    I tried that too before posting, but I kinda beleived it not the way to go:
    [code=mysql]
    DELIMITER //
    DROP PROCEDURE IF EXISTS INSERTDBsb//

    CREATE PROCEDURE INSERTDBsb( IN p_email varchar(160) , IN p_tablename varchar(80) , IN p_timestamp varchar(30) , IN p_data double)
    BEGIN
    DECLARE maxid bigint(20);
    DECLARE userid bigint(20);
    SET @s = CONCAT('SELECT max(_id) into maxid from ', p_tablename);...
    See more | Go to post
    Last edited by Atli; Jun 21 '08, 12:22 AM. Reason: Added [code] tags.

    Leave a comment:


  • justforfuntwt
    started a topic Stored procedure help please

    Stored procedure help please

    hello,

    I'm writing a stored procedure and i need some help:
    [code=mysql]
    DELIMITER //
    DROP PROCEDURE IF EXISTS INSERTDBsb//


    CREATE PROCEDURE INSERTDBsb( p_email varchar(160) , p_tablename varchar(80) , p_timestamp varchar(30) , p_data double)
    BEGIN
    DECLARE maxid bigint(20);
    DECLARE userid bigint(20);
    SELECT max(_id) into maxid from p_tablename;

    SELECT...
    See more | Go to post
    Last edited by Atli; Jun 20 '08, 11:23 PM. Reason: Added [code] tags.
No activity results to display
Show More
Working...