LMSouq

Knowledge Base

Browse Moodle Solutions

2108 solutions found

Page 28 of 106
0 votes
1 ans
3 views
Doctrine - How to print out the real sql, not just the prepared statement?

We're using Doctrine, a PHP ORM. I am creating a query like this: $q = Doctrine_Query::create()->select('id')->from('MyTable');...

database Solved
AM
asked 1 month ago by Amandasaurus
0 votes
1 ans
3 views
How do I install command line MySQL client on mac?

I want to install the MySQL client for the command line, not a GUI. I have searched over the web but only found instructions on installing the MySQL server.

database Solved
HC
asked 1 month ago by hch
0 votes
1 ans
3 views
Setting Django up to use MySQL

I want to move away from PHP a little and learn Python. In order to do web development with Python I'll need a framework to help with templating and other t...

database Solved
GR
asked 1 month ago by gregor
0 votes
1 ans
3 views
Add 2 hours to current time in MySQL?

Which is the valid syntax of this query in MySQL? SELECT * FROM courses WHERE (now() + 2 hours) > start_time *note: start_time is a field of course...

database Solved
EI
asked 1 month ago by Ei Maung
0 votes
1 ans
3 views
How do I turn off the mysql password validation?

It seems that I may have inadvertently loaded the password validation plugin in MySQL 5.7. This plugin seems to force all passwords to comply to certain rules....

database Solved
AL
asked 1 month ago by Alex Ryan
0 votes
1 ans
3 views
How to find the mysql data directory from command line in windows

In linux I could find the mysql installation directory with the command `which mysql`. But I could not find any in windows. I tried `echo %path%` and it resulte...

database Solved
PR
asked 1 month ago by Prabhu
0 votes
1 ans
3 views
Can't connect to local MySQL server through socket '/tmp/mysql.sock

When I attempted to connect to a local MySQL server during my test suite, it fails with the error: OperationalError: (2002, "Can't connect to l...

server-admin Solved
AL
asked 1 month ago by Alex Gaynor
0 votes
1 ans
3 views
MySQL date format DD/MM/YYYY select query?

I'm a bit confused on how to order by date formats. For the format `YYYY-MM-DD` you would do this: `...ORDER BY date DESC...` How would you order by...

database Solved
BA
asked 1 month ago by basickarl
0 votes
1 ans
3 views
"where 1=1" statement

> **Possible Duplicate:** > [Why would someone use WHERE 1=1 AND <conditions> in a SQL clause?](https://stackoverflow.com/questions/242822...

general-dev Solved
ME
asked 1 month ago by Mellon
0 votes
1 ans
3 views
Is there a naming convention for MySQL?

Here's how I do it: 1. Table names are lower case, use underscores to separate words, and are singular (e.g. `foo`, `foo_bar`, etc. 2. I generally (no...

database Solved
ST
asked 1 month ago by StackOverflowNewbie
0 votes
1 ans
3 views
MySQL Like multiple values

I have this MySQL query. I have database fields with this contents sports,shopping,pool,pc,games shopping,pool,pc,games sports,pub,swimmin...

database Solved
WE
asked 1 month ago by webmasters
0 votes
1 ans
3 views
Copy table without copying data

CREATE TABLE foo SELECT * FROM bar copies the table `foo` and duplicates it as a new table called `bar`. How can I copy the schema of `foo` to a new t...

general-dev Solved
MA
asked 1 month ago by Matthew
0 votes
1 ans
3 views
SQL - Update multiple records in one query

I have table - **config**. Schema: `config_name | config_value` And I would like to update multiple records in one query. I try like that: UPDATE c...

database Solved
US
asked 1 month ago by user3022527
0 votes
1 ans
3 views
LEFT JOIN only first row

I read many threads about getting only the first row of a left join, but, for some reason, this does not work for me. Here is my structure (simplified of cou...

general-dev Solved
KD
asked 1 month ago by KddC
0 votes
1 ans
3 views
Convert JS date time to MySQL datetime

Does anyone know how to convert JS dateTime to MySQL datetime? Also is there a way to add a specific number of minutes to JS datetime and then pass it to MySQL...

database Solved
LO
asked 1 month ago by locoboy
0 votes
1 ans
3 views
Get Insert Statement for existing row in MySQL

Using MySQL I can run the query: SHOW CREATE TABLE MyTable; And it will return the create table statement for the specificed table. This is useful if...

database Solved
KI
asked 1 month ago by Kibbee
0 votes
1 ans
3 views
MySQL high CPU usage

Recently my server CPU has been going very high. CPU load averages 13.91 (1 min) 11.72 (5 mins) 8.01 (15 mins) and my site has only had a slight increase in...

database Solved
JU
asked 1 month ago by Juddling
0 votes
1 ans
3 views
MySQL - Using COUNT(*) in the WHERE clause

I am trying to accomplish the following in MySQL (see `pseudo` code) SELECT DISTINCT gid FROM `gd` WHERE COUNT(*) > 10 ORDER BY lastupd...

database Solved
IC
asked 1 month ago by Ice
0 votes
1 ans
3 views
On Duplicate Key Update same as insert

I've searched around but didn't find if it's possible. I've this MySQL query: INSERT INTO table (id,a,b,c,d,e,f,g) VALUES (1,2,3,4,5,6...

general-dev Solved
RO
asked 1 month ago by Roy
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