Search
Search Code
mysql to sqlite notes
### MySQL to SQLite converterhttps://pypi.org/project/mysql-to-sqlite3/https://github.com/dumblob/mysql2sqlitehttps://stackoverflow.com/questions/3890518/convert-mysql-to-sqlite ```pip instal..
clean excess binary logs from mysql - free up space
Update: 30 July 2023 I actually prefer this command, i just have to figure out why im getting so many binlog files! MYSQL PURGE BINARY LOGS BEFORE '2023-07-30 00:00:00';PURGE BINARY LOGS BEFORE NOW..
function causing slow load time
i had this function matching a uid using a binary select query. The sites were loading in about 8 full seconds according to my load timer, sometimes up to 12 seconds! So this was running on old site ..
show views list function
list items by the view count
list page links function list_page_links
list top number of page links from selected table test run time on db of 4k items. select * from pages where publish = 'publish' order by insdate desc limit 10 10 rows (0.005 s)
MySQL to Sqlite converter
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the# CREATE block and create them in separate commands _after_ all the INSERTs. # Awk is choos..
make a nice readable date using a timestamp string function make_nice_date
handy if you have a timestamp like this: 2022-01-10 00:12:42 and want it to look a bit nicer. like this... 12:19 am, January 10, 2022
simple backup to google drive fron linux
i added these scripts a while ago to backup mysql databases and web files to google drive a while ago, i just run them on a daily cron to copy the backups every day. the files so the bain backup_a..
What is Core?
17 Aug 20 core is php content management system where the content is editable from the front end of the site, so there is no real back end to this system. i designed it to be easily extended so every..
Create a UTF8 General MySQL Database with Command
This will create a UTF8 database with the character encoding utf8_general_ci replacing the with your database name. I was manually doing this in adminer before this and selecting the encoding, this i..
php mysql table exists function
this checks if a mysql table already exists in the selected database and returns true or false
php convert date now into a sql timestamp
an easy way to get the current date from php into a mysql or sql timestamp format, this uses the server time
create a mysql or sqlite current timestamp with php
just in case you need to create a CURRENT_TIMESTAMP using php, this formats the current date into the following.
PHP MySQL vs SQLite Count Items Function
I have been writing a few functions using sqlite and mysql. There are a couple of slight differences which can be seen in this count items_function.