LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

422 solutions found in database

Page 2 of 22
0 votes
2 ans
3 views
How do I get the query builder to output its raw SQL query as a string?

Given the following code: <!-- language: lang-php --> DB::table('users')->get(); I want to get the raw SQL query string that the d...

database Solved
ME
asked 1 month ago by meiryo
0 votes
1 ans
3 views
SQL Query Where Field DOES NOT Contain $x

I want to find an SQL query to find rows where field1 does not contain $x. How can I do this?

database Solved
ZU
asked 1 month ago by zuk1
0 votes
1 ans
3 views
Easiest way to copy a table from one database to another?

What is the best method to copy the data from a table in one database to a table in another database when the databases are under different users? I know t...

database Solved
SP
asked 1 month ago by Sparky
0 votes
1 ans
3 views
Remove Primary Key in MySQL

I have the following table schema which maps user_customers to permissions on a live MySQL database: mysql> describe user_customer_permission; +-...

database Solved
MA
asked 1 month ago by markb
0 votes
1 ans
3 views
How can I tell when a MySQL table was last updated?

In the footer of my page, I would like to add something like "last updated the xx/xx/200x" with this date being the last time a certain mySQL table ha...

database Solved
RA
asked 1 month ago by RaGE
0 votes
1 ans
3 views
How to stop mysqld

To find out the start command for mysqld (using a mac) I can do: ps aux|grep mysql I get the following output, which allows me to start mysql server....

database Solved
DA
asked 1 month ago by David542
0 votes
1 ans
3 views
Warning the user/local/mysql/data directory is not owned by the mysql user

I can't start the mysql service in Snow Leopard, and in the panel prefs appears the message, > warning the user/local/mysql/data directory is not owne...

database Solved
KR
asked 1 month ago by Kronos
0 votes
1 ans
3 views
Strings as Primary Keys in MYSQL Database

I am not very familiar with databases and the theories behind how they work. Is it any slower from a performance standpoint (inserting/updating/querying) to us...

database Solved
MA
asked 1 month ago by mainstringargs
0 votes
1 ans
3 views
Does MySQL foreign_key_checks affect the entire database?

When I execute this command in MySQL: SET FOREIGN_KEY_CHECKS=0; Does it affect the whole engine or it is only my current transaction?

database Solved
SE
asked 1 month ago by Sean Nguyen
0 votes
1 ans
3 views
Difference between two dates in MySQL

How to calculate the difference between two dates, in the format `YYYY-MM-DD hh: mm: ss` and to get the result in seconds or milliseconds?

database Solved
GE
asked 1 month ago by GeoGo
0 votes
1 ans
3 views
How do I put an 'if clause' in an SQL string?

So here's what I want to do on my _MySQL_ database. I would like to do: SELECT * FROM itemsOrdered WHERE purchaseOrder_ID = &#39...

database Solved
JO
asked 1 month ago by John Ernest Guadalupe
0 votes
1 ans
3 views
MySQL Delete all rows from table and reset ID to zero

I need to delete all rows from a table but when I add a new row, I want the primary key ID, which has an auto increment, to start again from 0 respectively from...

database Solved
MA
asked 1 month ago by marek_lani
0 votes
1 ans
3 views
How to add not null constraint to existing column in MySQL

I have table name called "Person" with following column names P_Id(int), LastName(varchar), FirstName (varchar). I forgot to give...

database Solved
MY
asked 1 month ago by mymotherland
0 votes
2 ans
3 views
Find nearest latitude/longitude with an SQL query

I have latitude and longitude and I want to pull the record from the database, which has nearest latitude and longitude by the distance, if that distance gets l...

database Solved
BA
asked 1 month ago by Basit
0 votes
1 ans
3 views
MySQL OR vs IN performance

I am wondering if there is any difference with regards to performance between the following SELECT ... FROM ... WHERE someFIELD IN(1,2,3,4) SE...

database Solved
SC
asked 1 month ago by Scott
0 votes
1 ans
3 views
Equivalent of varchar(max) in MySQL?

What is the equivalent of varchar(max) in MySQL?

database Solved
DA
asked 1 month ago by David Basarab
0 votes
1 ans
3 views
Is there a REAL performance difference between INT and VARCHAR primary keys?

Is there a measurable performance difference between using INT vs. VARCHAR as a primary key in MySQL? I'd like to use VARCHAR as the primary key for referen...

database Solved
JA
asked 1 month ago by Jake McGraw
0 votes
1 ans
3 views
MySQL root password change

I have been trying to reset my MySQL root password. I have run `mysqld_safe --skip-grant-tables`, updated the root password, and checked the user table to make...

database Solved
NI
asked 1 month ago by nick
0 votes
1 ans
3 views
Maximum number of records in a MySQL database table

What is the upper limit of records for MySQL database table. I'm wondering about autoincrement field. What would happen if I add milions of records? How to...

database Solved
XP
asked 1 month ago by xpepermint
0 votes
1 ans
3 views
MySQL procedure vs function, which would I use when?

I'm looking at MySQL procedures and functions. What is the real difference? They seem to be similar, but a function has more limitations. I'm lik...

database Solved
AN
asked 1 month ago by Anonym