...
Enter the field to monitor under "Old field/Value" enclosed by double chevrons
Enter the same field to monitor under "New field/Value" enclosed by double chevrons
The final statement will ...
What?
A quick article on how to use the where clause in a joomla database query.
Why?
In response to a member, I use the old form where I can include the whole SQL statement:
$db->query('SELECT ...
... [carriage return] but to do this in the name of the column heading, the answer is a much simpler one, in your SQL statement, simply place your cursor where you want the carriage return and press Return/Enter. ...
What?
So this is an article exploring how to convert UPPERCASE text into mixed case. The feed is originally for a personnel feed so it won't be converting long paragraphs of English text. Instead it ...
... "dd/MM/yyyy HH:mm:ss")
-- yields 11/02/2014 11:21:32
Sounds good, where's the problem?
The problem
Putting the date in an IIF (if-then-else) statement displays "#Error". You should get errors ...
What?
Practice makes perfect. Or in my case, any practice is a start. This article serves as a quick note on how to use regular expressions within SQL statements:
How?
For the following examples, ...
... the two above FOR statements:
FOR /F "tokens=2,3* delims=_" %%A IN ('DIR InitializingFile*') DO FOR /F "tokens=1,2* delims=." %%I IN ('ECHO %%A') DO ECHO %%I
-- yields:
123
456
So Job done. ...
... 1999-02-25 1.00
If you have more than 999 items in the column, then you may need to increment the 3 in the above statement "LEFT(..., 3)".
Almost there, but in the above example, the dates ...
... which can only be seen when using more records and more employees.
PARTITION BY
So a sort of "group" action will allow this if we add "PARTITION BY" to the ROW_NUMBER() statement:
SELECT
...
... to select by relevance to the CASE order statement:
switch ($ordering) {
// BEGIN: joes new ordering option
case 'relevance':
$order = 'relevance DESC';
break;
// END: joes new ordering ...
...
Run the SQL script against a test database,
Modify the table name to use if necessary.
Uncomment the drop statement if running for the second time.
Modify the PHP file to use database login ...
... failure.
-- often when processing a datasource, the function is being applied to a NULL date timestamp.
Dealing with Date NULLs:
Fix: Put conditional statements to account for NULLs.
-- Standard
TRIM(This_Date) ...
... quick note on how to chain, the following two statements are equivalent:
-- note the semi-colons at the end of each line
$query->select($db->quoteName(array('user_id', 'user_name')));
$query->from($db->quoteName('#__users'));
$query->where($db->quoteName('user_id') ...
What?
So this is a quick article on how to delete from multiple tables in a mySQL database where we use some JOIN statements.
Why?
It is never recommended to delete from multiple tables and instead ...
... %X--- will give data ending with X
%X%--- will give data containig X
@GenerateSQLOnly -- Provide 1 if you only want to generate the SQL statements ...
What?
I have a mySQL database table of room assets that has a field containing the ID numbers of images relevant to this room.
The Problem?
When I select specifying the statement "WHERE IN (c.RoomImages)", ...
... this is not the solution to our problem. This is the solution that I initially used but my end-users were asking why is it always 0 seconds. This was because we were using the following MDX statement ...
Intro
If you ever want to check the parameters submitted with a report for alpha numeric characters (so it doesn't contain symbols, punctuations, etc) then you should do this at the database level, and ...
... since becoming an analyst, I do more at the database level now. What follows should be usable mySQL statements to get all the numbers:
Yesterdays
-- CURRENT: count todays
SELECT COUNT(id) FROM ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.