Assuming mysql is required, the following 75 results were found.
MySQL is just the best Unfortunately I make a living using Microsoft and Oracle products. I shouldn't say unfortunately as I don't see myself doing any other job and it beats daytime television any day. I use this quite a lot so I thought I'd put an...
In not as many words as others, here's my MySQL query to extract details on images stored in the MediaWiki CMS system (v1.14). Why? Prior to a migration and just after another change freeze, I had sent all Wiki articles modified since the last export...
below shows how to do this for when the week ends on Friday. Assuming it starts on the previous Saturday. Why? Problems with MySQL weeks always starting on Sunday means this isn't very useful. I have another system which starts on Monday and ends on the...
used to use a lot more PHP but 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 Table1 WHERE...
replace(@sql,'INTO SearchTMP','') END UPDATE @SQLTbl SET Execstatus = 1 WHERE Tablename = @tmpTblname END SET NOCOUNT OFF GO MySQL Source: http://kedar.nitty-witty.com/blog/search-through-all-databases-tables-columns-in-mysql - Kedar at Nitty-Witty.com...
have popped out that support some form of time recording and activity logging. The example below however is within a LAMP/MySQL environment but the SQL basics are here to help me adapt it to whatever environment people keep throwing at me. What I want:...
screenshot when adding a user to a database: Method #1: The following command on a cron job: // not recommended: /usr/bin/mysqldump -u dbusername -p'dbpassword' dbname > /path_to/backup.sql // recommended: using credentials stored in external file:...
Strip HTML in MySQLhttps://www.joellipman.com/articles/database/mysql/strip-html-in-mysql.html
for a solution and getting it to work in my environment. What? Need to be able to omit HTML tags in certain fields of a mySQL database. Why? We are preparing to migrate old content to a new system. From a MediaWiki CMS to a SaaS called Service-Now. The...
of our data. Let's say we have a banking app where we need to subtract funds from one account and add funds to another: $mysqli->query ("UPDATE 'accounts' SET 'balance' = 'balance'-1000000 WHERE 'user' = 'Bob'"); $mysqli->query ("UPDATE 'accounts' SET...
I've decided to put something in here as it took me an age to find out how I could do it. This is when using a MySQL query within a PHP script. The process is used often to do a statistics table or top ten chart of your data (eg. movies, music, etc)....
echo $my_count; -- If you try to retrieve the data before doing the count, you should get the following error: Warning: mysql_num_rows(): 80 is not a valid MySQL result resource in libraries\joomla\database\database\mysql.php on line 344 INSERT using...
MySQLhttps://www.joellipman.com/articles/database/mysql.html
A data type reference table. If you're designing a database then you don't need me to tell you what this is. My personal opinion is to always try to use the minimal type and length of the value required. For example, a comment of 500 words should only...
The Why So I find myself writing increasingly complex SQL scripts and it's at the stage where we need to optimize the queries because some scripts are noticeably slow (as observed by the customer...) and then others not. The What I'm going to run these...
Situation: I have a silly database table (not mine) storing CMIS Facility week numbers and their starting dates. For those of you unfamiliar with this system, the reason week numbers are different to normal people's week numbers is because these are...
Suppose you have a column in your table that you use as a counter (storing the value of the counter - eg. times an article has been displayed). Basically what I used to do is something similar to the following: SELECT counter_field_value FROM table1...
What? Quick note on how to do this. I was tasked with cleaning up an english database by replacing all special alphabets (ë to e) and non-alphanumeric symbols with URL friendly characters. How? -- return all records that contain non-alphanumeric...
What? A quick article on how to populate a database column from another table using a string comparison. Why? I have several database tables which replicate country names and I would rather they all use the ccTLD two letter code. This article was...
migration script. Why use a script? Well apps like jUpgrade didn't work for me. This is how to manually migrate using a MySQL database management tool like PhpMyAdmin. I'm not too bothered about upgrading my own personal site (Joomla 1.5), it's just the...
PHP Note that the following are sample values and just for myself to quickly modify a Wordpress configuration file. // ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME',...