Skip to content

Tag: sql

MYSQL codes not being read

When I input a code or anything into MySQL and hit “enter” it moves down and “->” appears. It is as if the code is not going through or the code is not being read. I have attempted to download “add-ons” but I am really not sure what I am doing. This is for school and I a…

SQL Stored Procedure Parameters Being Assigned to Variables

I’m sure there is some sound logic/best practice but I’d like it explained to me if possible. Looking at SQL stored procedures written by a previous employee he always declares 1 variable for each parameter and sets the variable equal to the parameter value and then uses the variable throughout th…

Mysql use 2 functions in 1 query

I’m trying to use 2 same functions in 1 query which is this This uses only the first function and give right result for the first latlngs only. I need the row which is almost near to the 2 latlngs (the latlngs is just example don’t care if it’s wrong <3 ) I want it to Give me the row

How to make generic SQL heredocs?

I’m making a mock ORM in Ruby, storing ‘forum’ data. I have the following tables: users (id, fname, lname), and questions (id, title, body, author_id). a_user.create and a_question.create are more or less the same: I’m writing another class, ModelBase, and I’d like to be able to …