// Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select all articles for users who have a username which starts with ‘a’. // Order it by the created date.…
// Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Select all articles for users who have a username which starts with ‘a’. // Order it by the created date.…
If you get some errors like this you need to open your home directory vim ~/.my.cnf and change on the row pass= to password=
If you do a lots of things in one php script this usually takes some time and mysql can gone away 😉 for this when you run new query you can run it with this function which will connect again…
for SQL in *.sql; do echo importing $SQL; mysql -u user -ppassword table< $SQL;rm $SQL; done
#!/bin/bash # dump-tables-mysql.sh # Descr: Dump MySQL table data into separate SQL files for a specified database. # Usage: Run without args for usage info. # Author: @Trutane # Ref: http://stackoverflow.com/q/3669121/138325 # Notes: # * Script will prompt for password…