LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

422 solutions found in database

Page 4 of 22
0 votes
1 ans
3 views
MySQL case sensitive query

This has been asked on this site before but I couldn't find a sufficient answer. If I'm doing a query like: Select Seller from Table where Locati...

database Solved
MI
asked 1 month ago by Michael Liao
0 votes
1 ans
3 views
Calculate difference between two datetimes in MySQL

I am storing the last login time in MySQL in, `datetime`-type filed. When users logs in, I want to get the difference between the last login time and the curren...

database Solved
DE
asked 1 month ago by Devesh Agrawal
0 votes
1 ans
3 views
Delimiters in MySQL

I often see people are using Delimiters. I tried myself to find out what are delimiters and what is their purpose. After 20 minutes of googling, I was not able...

database Solved
SY
asked 1 month ago by System.Data
0 votes
1 ans
3 views
mySQL :: insert into table, data from another table?

I was wondering if there is a way to do this purely in sql: q1 = SELECT campaign_id, from_number, received_msg, date_received FROM `received_t...

database Solved
HA
asked 1 month ago by Hailwood
0 votes
1 ans
3 views
SQL UPDATE all values in a field with appended string CONCAT not working

Here is what I want to do: current table: +----+-------------+ | id | data | +----+-------------+ | 1 | max...

database Solved
FR
asked 1 month ago by Fresheyeball
0 votes
1 ans
3 views
PHP/MySQL insert row then get 'id'

The 'id' field of my table auto increases when I insert a row. I want to insert a row and then get that ID. I would do it just as I said it, but is t...

database Solved
HI
asked 1 month ago by Hintswen
0 votes
1 ans
3 views
SQL order string as number

I have numbers saved as `VARCHAR` to a MySQL database. I can not make them `INT` due to some other depending circumstances. It is taking them as character n...

database Solved
JA
asked 1 month ago by Jamol
0 votes
1 ans
3 views
How to escape apostrophe (a single quote) in MySQL?

The [MySQL documentation][1] says that it should be `\'`. However, both SciTE and MySQL shows that `''` works. I saw that and it works. What shou...

database Solved
US
asked 1 month ago by user4951
0 votes
1 ans
3 views
How to create a database from shell command in MySQL?

I'm looking for something like createdb in PostgreSQL or any other solution that would allow me to create database with a help of a shell command. Any hints...

database Solved
AK
asked 1 month ago by akizd
0 votes
1 ans
3 views
Import SQL file into mysql

I have a database called `nitm`. I haven't created any tables there. But I have a SQL file which contains all the necessary data for the database. The file...

database Solved
KU
asked 1 month ago by kushalbhaktajoshi
0 votes
1 ans
3 views
MySQL - Get row number on select

Can I run a select statement and get the row number if the items are sorted? I have a table like this: mysql> describe orders; +-------------+...

database Solved
GE
asked 1 month ago by George
0 votes
1 ans
3 views
What is this operator <=> in MySQL?

I&#39;m working on code written by a previous developer and in a query it says, WHERE p.name &lt;=&gt; NULL What does `&lt;=&gt;` mean in this query?...

database Solved
ZZ
asked 1 month ago by zzlalani
0 votes
1 ans
3 views
MySQL: Sort GROUP_CONCAT values

In short: Is there any way to sort the values in a GROUP_CONCAT statement? Query: GROUP_CONCAT((SELECT GROUP_CONCAT(parent.name SEPARATOR &quot; &amp;...

database Solved
IV
asked 1 month ago by Ivar
0 votes
1 ans
3 views
MySQL "NOT IN" query

I wanted to run a simple query to throw up all the rows of `Table1` where a principal column value is not present in a column in another table (`Table2`). I...

database Solved
KJ
asked 1 month ago by KJ Saxena
0 votes
1 ans
3 views
How to show a MySQL warning that just happened?

I just ran a simple MySQL CREATE TABLE statement that produced the line &gt;&quot;Query OK, 0 rows affected, 1 warning (0.07 sec).&quot; It didn&#39;t a...

database Solved
PO
asked 1 month ago by Pops
0 votes
1 ans
3 views
How to recover MySQL database from .myd, .myi, .frm files

How to restore one of my MySQL databases from `.myd`, `.myi`, `.frm` files?

database Solved
CH
asked 1 month ago by chandrajeet
0 votes
1 ans
3 views
Mysql adding user for remote access

I created user `user@&#39;%&#39;` with `password &#39;password`. But I can not connect with: mysql_connect(&#39;localhost:3306&#39;, &#39;user&#39;, &#39...

database Solved
US
asked 1 month ago by user2333586
0 votes
1 ans
3 views
Throw an error preventing a table update in a MySQL trigger

If I have a trigger before the update on a table, how can I throw an error that prevents the update on that table?

database Solved
MA
asked 1 month ago by Matt MacLean
0 votes
1 ans
3 views
Binary Data in MySQL

How do I store binary data in [MySQL][1]? [1]: http://en.wikipedia.org/wiki/MySQL

database Solved
GE
asked 1 month ago by Geoff Dalgas
0 votes
1 ans
3 views
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'db'

I want to begin writing queries in MySQL. `show grants` shows: ```lang-none +--------------------------------------+ | Grants for @localhost...

database Solved
NI
asked 1 month ago by Nickool