Author:
erics , October 29th, 2020
First quit Mail, if open. In Terminal, enter the following to disable the Data Detectors which could be responsible for the hang:
defaults write com . apple . terminal DisableDataDetectors YES
Categories: How-To's , Technology Tags: Freeze , Hang , howto , MacOS , macosx , select , selection , Terminal , text() , tips
| No comments
Author:
erics , May 16th, 2018
SELECT t1.id FROM tableOne t1 LEFT JOIN tableTwo t2 ON t1.id = t2.id WHERE t2.id IS NULL The “WHERE t2.id IS NULL clause” restricts the results to only those rows where the id returned from tableTwo is null. tableTwo.id will be NULL for all records from tableOne where the id is not found in tableTwo.
Categories: How-To's , Technology Tags: howto , Join , Left Join , mysql , Query , Row , Rows , select , SQL , Table , tips , Where
| No comments
Author:
erics , October 2nd, 2015
I needed to automate the addition of new users with a sequential member’s ID in WordPress. Additionally, there were non-numeric entries in that column that had to be ignored. The wp_users.user_login column is a varchar(60) and so does not naturally handle numeric operations well at all. The solution is a combination of REGEXP and cast(): […]
Categories: How-To's , Technology Tags: Cast , Char , Column , Filter , howto , Max , mysql , Numeric , Regex , regexp , select , sort , SQL , tips , Varchar , Where , WordPress
| No comments
Author:
erics , April 19th, 2014
table.myTable > tbody > tr:first-child > td:first-child
Categories: How-To's , Technology Tags: :first-child , Cell , Child , CSS , first , howto , html , Row , select , Table , TD , TH , tips
| No comments
Author:
erics , September 6th, 2012
select field from table where field REGEXP '^-?[0-9]+$' ;
Categories: How-To's , Technology Tags: howto , mysql , Numeric , Regex , select , tips
| No comments
Author:
erics , May 9th, 2012
if ( ! jQuery ( 'input[name=yourRadioGroup]' ) . is ( ':checked' ) ) return false ;
~ OR ~
if ( ! jQuery ( 'input[name=yourRadioGroup]:checked' ) . val ( ) ) {
alert ( 'Please make a selection...' ) ;
} else {
alert ( 'Thank you for making a selection!' ) ;
}
Categories: How-To's , Technology Tags: Check , Checked , howto , JQuery , Radio , Radio Button , select , selected , selection , tips
| No comments
Author:
erics , January 27th, 2012
The PHP
$ sql = 'select * from yourTable' ;
$ result = mysql_query ( $ sql ) ;
$ rows = array ( ) ;
while ( $ row = mysql_fetch_assoc ( $ result ) ) {
$ rows [ ] = $ row ;
}
$ page = new Smarty ( ) ;
$ page -> assign ( 'rows' , $ rows ) ;
$ page -> show ( 'yourTemplate.php' ) ;
The Smarty Template
{ if $ rows }
{ section name = row loop = $ rows }
{ foreach from = $ rows [ row ] key = "Key" item = "Value" }
< p > { $ Key } : { $ Value } < / p >
{ / foreach }
{ / section }
{ else }
< h1 > NO ROWS FOUND < / h1 >
{ / if }
Categories: How-To's , Technology Tags: howto , mysql , php , select , Smarty , tips
| No comments
Author:
erics , July 2nd, 2011
jQuery ( 'option:selected' ) . removeAttr ( "selected" ) ;
Categories: How-To's , Technology Tags: Deselect , howto , javascript , JQuery , option , select , tips
| No comments
Author:
erics , July 2nd, 2011
jQuery ( '#elementID option:first' ) . attr ( "selected" , "selected" ) ;
Categories: How-To's , Technology Tags: howto , javascript , JQuery , option , select , tips
| No comments
Author:
erics , June 8th, 2011
CREATE TABLE newTable LIKE oldTable ;
INSERT INTO newTable SELECT * FROM oldTable ;
INSERT INTO newtable ( ` name ` , ` address1 ` , ` address2 ` , ` city ` , ` state ` , ` zip ` , ` phone ` ) SELECT ` name ` , ` address1 ` , ` address2 ` , ` city ` , ` state ` , ` zip ` , ` phone ` FROM oldtable ;
Categories: How-To's , Technology Tags: Copy , Dupe , Duplicate , howto , Insert , Insert Into , Insert Select , mysql , select , SQL , Table , tips
| No comments