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 8783921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:57:06+00:00 2026-06-13T20:57:06+00:00

I am having an issue with making a MySql Routine. Here is the code:

  • 0

I am having an issue with making a MySql Routine.

Here is the code:

DELIMITER '$$';
CREATE PROCEDURE User.Login(IN UserName CHAR(32), IN PWord CHAR(32))
BEGIN
Select `userID`, `userType`, `userMainEmail`, `groupID`
    From `at_users`
    Where `userName` = UserName And `userPass` = PWord
    LIMIT 1
FOR UPDATE;

    Update `at_users`
    Set `lastLoginAt` = now()
    Where `userName` = UserName And `userPass` = PWord;
END$$

What it’s supposed to do is a simple login task that’s done just about everywhere… get a users record, then update the table with now()

What I am getting on creating this is:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your     MySQL server version for the right syntax to use near '' at line 12

Line 12 is the line right before END$$

Yes, all fields and tables exist. 🙂

EDIT: NEW CODE

DELIMITER //;
CREATE PROCEDURE User.Login(IN UserName CHAR(32), IN PWord CHAR(32))
BEGIN
Select `userID`, `userType`, `userMainEmail`, `groupID`
    From `at_users`
    Where `userName` = UserName And `userPass` = PWord
    LIMIT 1
FOR UPDATE;

    Update `at_users`
    Set `lastLoginAt` = now()
    Where `userName` = UserName And `userPass` = PWord;
END//
DELIMITER ;

I am trying this exact code from the command line, after logging in and selecting the proper database to USE.

After the last line ‘DELIMITER ;’ nothing happens and I stay at the -> line

  • 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-13T20:57:08+00:00Added an answer on June 13, 2026 at 8:57 pm

    Got it.

    Here is the code I ended up having to use:

    DELIMITER //
    CREATE PROCEDURE UserLogin(IN UserName CHAR(32), IN PWord CHAR(32))
        BEGIN
            Select `userID`, `userType`, `userMainEmail`, `groupID`
            From `at_users`
            Where `userName` = UserName And `userPass` = PWord
            LIMIT 1
            FOR UPDATE;
    
            Update `at_users`
            Set `lastLoginAt` = now()
            Where `userName` = UserName And `userPass` = PWord;
        END//
    DELIMITER ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having issue making a form be sent using ajax. Here is my
I am having an issue in an interface I am making in Java. It
I've been making an image uploader and I'm having a couple of issues. Code
Having an issue with a salesforce login on our site. When the customer fills
im am having an issue with a jquery file making a visual light box
I'm having an issue with draggable. I'm making a Window Manager-esque system and wanting
I'm having an issue determining which technologies to use in a cross-platform environment. Here's
I have a pretty basic assignment, but am having an issue making my main
I am having some issue with making resizable and draggable work together on an
I am having an issue using the maxrows property of tilelist. My code looks

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.