Skip to content

Tag: sql

passing varables’ value from one form to another in php

I have three forms – payment.php , payment1.php and paydb.php . payment.php contains the front end form.payment1.php contains the back end of the form of payment.php. whereas we are shifting to paydb.php from payment1.php. Now I’m filling the form by entering member number in payment.php which is …

SQL: query repeating rows in join

I’m trying to display all my exercises which are in course A (course_id ‘1’) When I run this query: I get this: It’s worth noting that courses have sessions and in that session there are these exercises. Realistically only exercise_id’s 1 and 4 are linked to course 1. So why are …

How to check if a value is a number in SQLite

I have a column that contains numbers and other string values (like “?”, “???”, etc.) Is it possible to add an “is number” condition to the where clause in SQLite? Something like: Answer From the documentation, The typeof(X) function returns a string that indicates the data…

The inverse of a between select

I want to select the inverse of a data range in a Postgres database: the query i am trying to use is SELECT * FROM projects WHERE lastactivity BETWEEN 2015-08-3 AND 2015-09-11

Average value for top n records?

i have this SQL Schema: http://sqlfiddle.com/#!9/eb34d In particular these are the relevant columns for this question: ut_id,ob_punti I need to get the average of the TOP n (where n is 4) values of …

Telecommunication app database design [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year. Improve this question I would just like to ask or get a few expert advices/directions on buil…

Select minute from CURTIME() in a sql query

I have a column with CURTIME() value. I want a query that selects the minute from the column with CURTIME() and copy the minute to another column. Answer You could use the minute function. If you’re just querying it: To save this value to another column: