LMSouq

Knowledge Base

Browse Moodle Solutions

2108 solutions found

Page 35 of 106
0 votes
1 ans
3 views
How to get all columns' names for all the tables in MySQL?

Is there a fast way of getting all column names from all tables in `MySQL`, without having to list all the tables?

database Solved
DI
asked 1 month ago by dieter
0 votes
1 ans
3 views
Table is marked as crashed and should be repaired

I am getting this error in [WordPress][1]' phpMyAdmin: #145 - Table './DB_NAME/wp_posts' is marked as crashed and should be repaired When...

general-dev Solved
JO
asked 1 month ago by John Connor
0 votes
1 ans
3 views
MySQL ON DUPLICATE KEY UPDATE for multiple rows insert in single query

I have a SQL query where I want to insert multiple rows in single query. so I used something like: $sql = "INSERT INTO beautiful (name, age)...

database Solved
PR
asked 1 month ago by Prashant
0 votes
1 ans
3 views
Error 1022 - Can't write; duplicate key in table

I'm getting a 1022 error regarding duplicate keys on create table command. Having looked at the query, I can't understand where the duplication is takin...

general-dev Solved
GI
asked 1 month ago by Git-able
0 votes
1 ans
3 views
How to move columns in a MySQL table?

Currently I am having the following MySQL table: `Employees (empID, empName, department);` I want to change the table to the following: `Employees (empID, de...

database Solved
SU
asked 1 month ago by sumit
0 votes
1 ans
3 views
How to use MySQLdb with Python and Django in OSX 10.6?

This is a much discussed issue for OSX 10.6 users, but I haven't been able to find a solution that works. Here's my setup: Python 2.6.1 64bit Django...

database Solved
JO
asked 1 month ago by Joe
0 votes
1 ans
3 views
MySQL: How to copy rows, but change a few fields?

I have a large number of rows that I would like to copy, but I need to change one field. I can select the rows that I want to copy: select * from Tabl...

database Solved
AN
asked 1 month ago by Andrew
0 votes
1 ans
3 views
How do you stop MySQL on a Mac OS install?

I installed MySQL via [MacPorts][1]. What is the command I need to stop the server (I need to test how my application behave when MySQL is dead)? [1]: http...

database Solved
LA
asked 1 month ago by Laurie Young
0 votes
1 ans
3 views
MySQL Workbench: How to keep the connection alive

**Error Code: 2013. Lost connection to MySQL server during query** I am using MySQL Workbench. Also, I am running a batch of inserts, about 1000 lines total...

database Solved
OM
asked 1 month ago by Omar Juvera
0 votes
1 ans
3 views
How do you run a single query through mysql from the command line?

I'm looking to be able to run a single query on a remote server in a scripted task. For example, intuitively, I would imagine it would go something like:...

database Solved
MA
asked 1 month ago by Matthew
0 votes
1 ans
3 views
How Can I Set the Default Value of a Timestamp Column to the Current Timestamp with Laravel Migrations?

I would like to make a timestamp column with a default value of `CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP` using the Laravel Schema Builder/Migrations. I h...

php-dev Solved
JO
asked 1 month ago by JoeyD473
0 votes
1 ans
3 views
setting multiple column using one update

How to set multiple columns of a table using update query in mysql?

general-dev Solved
AM
asked 1 month ago by Amogh
0 votes
1 ans
3 views
Configuration System Failed to Initialize

I'm currently creating a Login form and have this code: string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"...

general-dev Solved
SE
asked 1 month ago by sean
0 votes
1 ans
3 views
Select last row in MySQL

How can I `SELECT` the last row in a MySQL table? I'm `INSERT`ing data and I need to retrieve a column value from the previous row. There's an `au...

database Solved
ES
asked 1 month ago by esqew
0 votes
1 ans
3 views
What does it mean `SELECT 1 FROM table`?

I have seen many queries with something as follows: SELECT 1 FROM table What does this `1` mean, how will it be executed, and what will it retu...

general-dev Solved
MI
asked 1 month ago by Microsoft Developer
0 votes
1 ans
3 views
Count the number of occurrences of a string in a VARCHAR field?

I have a table like this: TITLE | DESCRIPTION ---------------|-------------------------------- test1 | value blah blah value test2...

database Solved
GE
asked 1 month ago by Geekman
0 votes
1 ans
3 views
Mysql error 1452 - Cannot add or update a child row: a foreign key constraint fails

I'm having a bit of a strange problem. I'm trying to add a foreign key to one table that references another, but it is failing for some reason. With my...

database Solved
ZI
asked 1 month ago by Zim
0 votes
1 ans
3 views
Invalid default value for 'create_date' timestamp field

I have the following sql create statement mysql> CREATE TABLE IF NOT EXISTS `erp`.`je_menus` ( -> `id` INT(11) NOT NULL AUTO_INCREMEN...

general-dev Solved
RO
asked 1 month ago by robert
0 votes
1 ans
3 views
How to remove MySQL root password

I want to remove the password for user root in localhost. How can I do that? By mistake I have set the password of root user. That's why phpmyadmin is givin...

database Solved
NE
asked 1 month ago by nectar
0 votes
1 ans
3 views
What's the difference between using INDEX vs KEY in MySQL?

I know how to use INDEX as in the following code. And I know how to use *foreign key* and *primary key*. ```mysql CREATE TABLE tasks ( task_id...

database Solved
SH
asked 1 month ago by shin