LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

422 solutions found in database

Page 15 of 22
0 votes
1 ans
3 views
Difference between VARCHAR and TEXT in MySQL

When we create a table in MySQL with a `VARCHAR` column, we have to set the length for it. But for `TEXT` type we don't have to provide the length. What...

database Solved
US
asked 1 month ago by user3840485
0 votes
1 ans
3 views
MySQL error 1449: The user specified as a definer does not exist

When I run the following query I get an error: SELECT `a`.`sl_id` AS `sl_id`, `a`.`quote_id` AS `quote_id`,...

database Solved
TE
asked 1 month ago by Tech MLG
0 votes
1 ans
3 views
What is the ideal data type to use when storing latitude / longitude in a MySQL database?

Bearing in mind that I'll be performing calculations on lat / long pairs, what datatype is best suited for use with a MySQL database?

database Solved
CO
asked 1 month ago by Codebeef
0 votes
1 ans
3 views
How to select the nth row in a SQL database table?

I'm interested in learning some (ideally) database agnostic ways of selecting the *n*th row from a database table. It would also be interesting to see how t...

database Solved
CH
asked 1 month ago by Charles Roper
0 votes
2 ans
4 views
How can I do three table JOINs in an UPDATE query?

I asked a question and got this reply which helped. UPDATE TABLE_A a JOIN TABLE_B b ON a.join_col = b.join_col AND a.column_a = b.column_b...

database Solved
RI
asked 1 month ago by Ricky
0 votes
2 ans
4 views
How can I check MySQL engine type for a specific table?

My MySQL database contains several tables using different storage engines (specifically myisam and innodb). How can I find out which tables are using which e...

database Solved
ON
asked 1 month ago by oneself
0 votes
1 ans
3 views
How do I show the schema of a table in a MySQL database?

From the [MySQL](https://www.mysql.com/) console, what command displays the schema of any given table?

database Solved
DL
asked 1 month ago by dlamblin
0 votes
2 ans
4 views
Delete all Duplicate Rows except for One in MySQL?

How would I delete all duplicate data from a MySQL Table? For example, with the following data: SELECT * FROM names; +----+--------+ | id...

database Solved
HI
asked 1 month ago by Highway of Life
0 votes
1 ans
3 views
Convert from MySQL datetime to another format with PHP

I have a `datetime` column in MySQL. How can I convert it to the display as **mm/dd/yy H:M (AM/PM)** using PHP?

database Solved
TI
asked 1 month ago by Tim Boland
0 votes
2 ans
4 views
PDOException SQLSTATE[HY000] [2002] No such file or directory

I believe that I've successfully deployed my (very basic) site to fortrabbit, but as soon as I connect to SSH to run some commands (such as `php artisan mig...

database Solved
DA
asked 1 month ago by Daniel Hollands
0 votes
1 ans
3 views
Select all columns except one in MySQL?

I'm trying to use a select statement to get all of the columns from a certain MySQL table except one. Is there a simple way to do this? EDIT: There are 5...

database Solved
TO
asked 1 month ago by Tom Grochowicz
0 votes
1 ans
3 views
MySQL JDBC Driver 5.1.33 - Time Zone Issue

Some background: I have a Java 1.6 webapp running on Tomcat 7. The database is MySQL 5.5. Previously, I was using Mysql JDBC driver 5.1.23 to connect to the...

database Solved
BL
asked 1 month ago by bluecollarcoder
0 votes
1 ans
3 views
SQL query return data from multiple tables

I would like to know the following: - how to get data from multiple tables in my database? - what types of methods are there to do this? - what are joins a...

database Solved
FL
asked 1 month ago by Fluffeh
0 votes
1 ans
3 views
How to use GROUP BY to concatenate strings in MySQL?

Basically the question is how to get from this: <pre> foo_id foo_name 1 A 1 B 2 C </pre> to this: <pre>...

database Solved
PA
asked 1 month ago by Paweł Hajdan
0 votes
2 ans
3 views
MySQL: Insert record if not exists in table

I am trying to execute the following query: INSERT INTO table_listnames (name, address, tele) VALUES ('Rupert', 'Somewhere', '02...

database Solved
RU
asked 1 month ago by Rupert
0 votes
1 ans
3 views
Get record counts for all tables in MySQL database

Is there a way to get the count of rows in all tables in a MySQL database without running a `SELECT count()` on each table?

database Solved
MA
asked 1 month ago by Mark
0 votes
2 ans
4 views
How to create a MySQL hierarchical recursive query?

I have a MySQL table which is as follows: | id | name | parent_id |:--:|:-----------:|:---------: | 19 | category1 | 0 | 20 | category2...

database Solved
TA
asked 1 month ago by Tarun Parswani
0 votes
1 ans
3 views
SELECT list is not in GROUP BY clause and contains nonaggregated column .... incompatible with sql_mode=only_full_group_by

I'm using MySQL 5.7.13 on my windows PC with WAMP Server. My problem is while executing this query SELECT * FROM `tbl_customer_pod_uploads`...

database Solved
DH
asked 1 month ago by Dhanu Kanakala
0 votes
1 ans
3 views
Remove duplicate rows in MySQL

I have a table with the following fields: id (Unique) url (Unique) title company site_id Now, I need to remove rows having same `...

database Solved
CH
asked 1 month ago by Chetan
0 votes
1 ans
3 views
Multiple Updates in MySQL

I know that you can insert multiple rows at once, is there a way to update multiple rows at once (as in, in one query) in MySQL? Edit: For example I have th...

database Solved
TE
asked 1 month ago by Teifion