LMSouq

Knowledge Base

Browse Moodle Solutions

2108 solutions found

Page 26 of 106
0 votes
1 ans
3 views
How can I calculate the difference between two dates using PHP?

I have two dates of the form: ```lang-none Start Date: 2007-03-24 End Date: 2009-06-26 ``` Now I need to find the difference between these two in the f...

php-dev Solved
GN
asked 1 month ago by gnanesh
0 votes
1 ans
3 views
How to fix "Headers already sent" error in PHP

When running my script, I am getting several errors like this: > Warning: Cannot modify header information - headers already sent by (**output started at...

php-dev Solved
MO
asked 1 month ago by Moses89
0 votes
1 ans
3 views
Get first key in a (possibly) associative array?

What's the best way to determine the first key in a possibly associative array? My first thought it to just foreach the array and then immediately breaking...

php-dev Solved
AL
asked 1 month ago by Alex S
0 votes
1 ans
3 views
Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted

I have a bunch of client point of sale (POS) systems that periodically send new sales data to one centralized database, which stores the data into one big datab...

general-dev Solved
AR
asked 1 month ago by ArcticZero
0 votes
1 ans
3 views
How do I send a POST request with PHP?

Actually I want to read the contents that come after the search query, when it is done. The problem is that the URL only accepts `POST` methods, and it does not...

php-dev Solved
FR
asked 1 month ago by Fred Tanrikut
0 votes
1 ans
3 views
Pretty-Printing JSON with PHP

I'm building a PHP script that feeds JSON data to another script. My script builds data into a large associative array, and then outputs the data using `jso...

php-dev Solved
ZA
asked 1 month ago by Zach Rattner
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
Using "like" wildcard in prepared statement

I am using prepared statements to execute mysql database queries. And I want to implement a search functionality based on a keyword of sorts. For that I nee...

general-dev Solved
SS
asked 1 month ago by ssn
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
On duplicate key ignore?

I'm trying to finish this query; my tag field is set to UNIQUE and I simply want the database to ignore any duplicate tag. INSERT INTO table_tags (t...

general-dev Solved
CO
asked 1 month ago by CodeChap
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
Copy values from one column to another in the same table

How can I make a copy values from one column to another? I have: Database name: list ------------------- number | test --------------...

general-dev Solved
LU
asked 1 month ago by Lucas
0 votes
1 ans
3 views
Docker-compose check if mysql connection is ready

I am trying to make sure that my app container does not run migrations / start until the db container is started and READY TO accept connections. So I decide...

server-admin Solved
JO
asked 1 month ago by John Kariuki