LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

422 solutions found in database

Page 17 of 22
0 votes
1 ans
3 views
When to use single quotes, double quotes, and backticks in MySQL

I am trying to learn the best way to write queries. I also understand the importance of being consistent. Until now, I have randomly used single quotes, double...

database Solved
NA
asked 1 month ago by Nate
0 votes
1 ans
3 views
What is the best collation to use for MySQL with PHP?

Is there a collation type which is officially recommended by MySQL, for a general website where you aren't 100% sure of what will be entered? I understand t...

database Solved
DA
asked 1 month ago by Darryl Hein
0 votes
1 ans
3 views
SQL injection that gets around mysql_real_escape_string()

Is there an SQL injection possibility even when using `mysql_real_escape_string()` function? Consider this sample situation. SQL is constructed in PHP like t...

database Solved
RI
asked 1 month ago by Richard Knop
0 votes
1 ans
3 views
Create new user in MySQL and give it full access to one database

I want to create a new user in MySQL and give it full access only to one database, say `dbTest` that I create with a command like `create database dbTest;`. Wha...

database Solved
JI
asked 1 month ago by jimgh
0 votes
1 ans
3 views
Find duplicate records in MySQL

I want to pull out duplicate records in a MySQL Database. This can be done with: SELECT address, count(id) as cnt FROM list GROUP BY address HAVING...

database Solved
CH
asked 1 month ago by Chris Bartow
0 votes
1 ans
3 views
MySQL: Grant **all** privileges on database

I've created database, for example 'mydb'. CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_bin; CREATE USER 'myuser'@'...

database Solved
MA
asked 1 month ago by marioosh
0 votes
1 ans
3 views
How do I change the data type for a column in MySQL?

I want to change the data type of multiple columns from float to int. What is the simplest way to do this? There is no data to worry about, yet.

database Solved
ER
asked 1 month ago by Eric Wilson
0 votes
2 ans
4 views
MySQL - UPDATE query based on SELECT Query

I need to check (from the same table) if there is an association between two events based on date-time. One set of data will contain the ending date-time of...

database Solved
JO
asked 1 month ago by John M
0 votes
1 ans
3 views
How do I restore a dump file from mysqldump?

I was given a MySQL database file that I need to restore as a database on my Windows Server 2008 machine. I tried using MySQL Administrator, but I got the fo...

database Solved
ZA
asked 1 month ago by Zack Peterson
0 votes
2 ans
4 views
How to skip certain database tables with mysqldump?

Is there a way to restrict certain tables from the mysqldump command? For example, I'd use the following syntax to dump *only* `table1` and `table2`:...

database Solved
ZA
asked 1 month ago by Zac
0 votes
1 ans
3 views
Differences between INDEX, PRIMARY, UNIQUE, FULLTEXT in MySQL?

What are the differences between PRIMARY, UNIQUE, INDEX and FULLTEXT when creating MySQL tables? How would I use them?

database Solved
SA
asked 1 month ago by Sam
0 votes
1 ans
3 views
MySQL Error #1071 - Specified key was too long; max key length is 767 bytes

When I executed the following command: ALTER TABLE `mytable` ADD UNIQUE ( `column1` , `column2` ); I got this error message: #10...

database Solved
ST
asked 1 month ago by Steven
0 votes
1 ans
3 views
MySQL string replace

I have a column containing urls (id, url): http://www.example.com/articles/updates/43 http://www.example.com/articles/updates/866 http://www.ex...

database Solved
N0
asked 1 month ago by n00b
0 votes
1 ans
3 views
How to retrieve the current version of a MySQL database management system (DBMS)?

What command returns the current version of a MySQL database?

database Solved
PH
asked 1 month ago by pheromix
0 votes
1 ans
3 views
What is the size of column of int(11) in mysql in bytes?

What is the size of column of `int(11)` in mysql in bytes? And Maximum value that can be stored in this columns?

database Solved
GA
asked 1 month ago by Gaurav
0 votes
1 ans
3 views
How to run SQL script in MySQL?

I want to execute a text file containing SQL queries, in MySQL. I tried to run `source /Desktop/test.sql` and received the error: > mysql> . \home\...

database Solved
US
asked 1 month ago by user1160432
0 votes
1 ans
3 views
How can I view live MySQL queries?

How can I trace MySQL queries on my Linux server as they happen? For example I'd love to set up some sort of listener, then request a web page and view a...

database Solved
BA
asked 1 month ago by barfoon
0 votes
1 ans
3 views
How to see indexes for a database or table in MySQL?

How do I see if my database has any indexes on it? How about for a specific table?

database Solved
BL
asked 1 month ago by Blankman
0 votes
1 ans
3 views
How to do a regular expression replace in MySQL?

I have a table with ~500k rows; varchar(255) UTF8 column `filename` contains a file name; I'm trying to strip out various strange characters out of the f...

database Solved
PI
asked 1 month ago by Piskvor
0 votes
1 ans
3 views
Delete with Join in MySQL

Here is the script to create my tables: CREATE TABLE clients ( client_i INT(11), PRIMARY KEY (client_id) ); CREATE TABLE proje...

database Solved
GE
asked 1 month ago by GeekJock