LMSouq

Knowledge Base

Browse Moodle Solutions

2108 solutions found

Page 39 of 106
0 votes
1 ans
3 views
What does `unsigned` in MySQL mean and when to use it?

What does "unsigned" mean in MySQL and when should I use it?

database Solved
HE
asked 1 month ago by HELP
0 votes
1 ans
3 views
How to convert all tables from MyISAM into InnoDB?

I know I can issue an alter table individually to change the table storage from MyISAM to InnoDB. I am wondering if there is a way to quickly change all of t...

database Solved
PE
asked 1 month ago by Pentium10
0 votes
1 ans
3 views
Order a MySQL table by two columns

How do I sort a MySQL table by two columns? What I want are articles sorted by highest ratings first, then most recent date. As an example, this would be...

database Solved
MA
asked 1 month ago by magenta
0 votes
1 ans
3 views
How can I stop a running MySQL query?

I connect to `mysql` from my Linux shell. Every now and then I run a `SELECT` query that is too big. It prints and prints and I already know this is not what I...

database Solved
DA
asked 1 month ago by David B
0 votes
1 ans
3 views
PHP + MySQL transactions examples

I really haven't found normal example of PHP file where MySQL transactions are being used. Can you show me simple example of that? And one more question...

database Solved
GO
asked 1 month ago by good_evening
0 votes
1 ans
3 views
mysql Foreign key constraint is incorrectly formed error

`table1` is the parent table with a column `ID` and `table2` has a column `IDFromTable1`. Why when I put a FK on `IDFromTable1` to `ID` in `table1` do I get...

database Solved
US
asked 1 month ago by user516883
0 votes
1 ans
3 views
Convert timestamp to date in MySQL query

I want to convert a `timestamp` in MySQL to a date. I would like to format the user.registration field into the text file as a `yyyy-mm-dd`. Here is my SQL:...

database Solved
RE
asked 1 month ago by remyremy
0 votes
1 ans
3 views
How to debug Lock wait timeout exceeded on MySQL?

In my production error logs I occasionally see: > SQLSTATE[HY000]: General error: 1205 > Lock wait timeout exceeded; try > restarting transaction...

database Solved
MA
asked 1 month ago by Matt McCormick
0 votes
1 ans
3 views
How to select date from datetime column?

I have a column of type "datetime" with values like 2009-10-20 10:00:00 I would like to extract date from datetime and write a query like: S...

general-dev Solved
MY
asked 1 month ago by mysqllearner
0 votes
1 ans
3 views
Is it possible to GROUP BY multiple columns using MySQL?

Is it possible to `GROUP BY` more than one column in a MySQL `SELECT` query? For example: GROUP BY fV.tier_id AND 'f.form_template_id'

database Solved
RH
asked 1 month ago by Rhys Thought
0 votes
1 ans
3 views
Connect to mysql in a docker container from the host

**In a nutshell** I want to run mysql in a docker container and connect to it from my host. So far, the best I have achieved is: ERROR 2002 (HY000): C...

server-admin Solved
GT
asked 1 month ago by gturri
0 votes
1 ans
3 views
How to remove constraints from my MySQL table?

I want to remove constraints from my table. My query is: ALTER TABLE `tbl_magazine_issue` DROP CONSTRAINT `FK_tbl_magazine_issue_mst_users` But...

database Solved
DE
asked 1 month ago by deepu sankar
0 votes
1 ans
3 views
MySQL > Table doesn't exist. But it does (or it should)

I changed the datadir of a MySQL installation and all the bases moved correctly except for one. I can connect and `USE` the database. `SHOW TABLES` also retur...

database Solved
JO
asked 1 month ago by johnsmith
0 votes
1 ans
3 views
Types in MySQL: BigInt(20) vs Int(20)

I was wondering what the difference between `BigInt`, `MediumInt`, and `Int` are... it would seem obvious that they would allow for larger numbers; however, I c...

database Solved
PA
asked 1 month ago by Parris
0 votes
1 ans
3 views
Difference between primary key and unique key

I'm using a MySQL database. In which situations should I create a unique key or a primary key?

general-dev Solved
AN
asked 1 month ago by Anuj
0 votes
1 ans
3 views
MySQL search and replace some text in a field

What MySQL query will do a text search and replace in one particular field in a table? I.e. search for `foo` and replace with `bar` so a record with a field...

database Solved
JU
asked 1 month ago by julz
0 votes
1 ans
3 views
ERROR 1452: Cannot add or update a child row: a foreign key constraint fails

I have created tables in MySQL Workbench as shown below : **ORDRE table:** CREATE TABLE Ordre ( OrdreID INT NOT NULL, OrdreDato DA...

database Solved
US
asked 1 month ago by user3289677
0 votes
1 ans
3 views
MySQL Server has gone away when importing large sql file

I tried to import a large sql file through phpMyAdmin...But it kept showing error >'MySql server has gone away' What to do?

server-admin Solved
FR
asked 1 month ago by FrancisMV123
0 votes
1 ans
3 views
Find and Replace text in the entire table using a MySQL query

Usually I use manual find to replace text in a MySQL database using phpMyAdmin. I'm tired of it now, how can I run a query to find and replace a text with n...

database Solved
AL
asked 1 month ago by alyasabrina
0 votes
1 ans
3 views
MySQL OPTIMIZE all tables?

MySQL has an <a href="http://dev.mysql.com/doc/refman/5.1/en/optimize-table.html">OPTIMIZE TABLE</a> command which can be used to reclaim...

database Solved
AL
asked 1 month ago by Alana Storm