• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

Random Thoughts

IE Takes Time

September 1, 2011 by Webhead

IE has officially forced me to spend 50% more time to complete a project.  Bugs, workarounds, special IE filters, all contributed to the time.  The last 3 or 4 projects, I tracked my hours spent on IE.  Maybe Microsoft secretly hates other developers.

I have a new example demonstrating a few HTML 5 features like:

  • gradient
  • vertical text
  • shadow

Of course, IE is not yet a “modern” browser so it needs to use it’s little “filter” hack.  Leave it to IE to have a bug in it’s own hack.  Gradients and Shadows cannot be shown at the same time.  I haven’t really found a workaround yet.

http://mymonkeydo.com/example/chart_gradient_vtext_shadow.html

Filed Under: Random Thoughts Tagged With: css, html 5, IE crap, jquery

I figured out why IE is so crappy

July 8, 2011 by Webhead

Microsoft’s plan for Internet Explorer  is to get their browser to #1.  How do they do that?  Well, everyone knows in order to be popular you have to be on the first page of search results.  To do that they look at all the browsers out there and make it one step crappier than than the crappiest browser.  Then, when developers and users alike complain about how crappy IE is, low and behold it’s in all the forums and discussions!

Filed Under: Random Thoughts Tagged With: IE crap

I Don’t Always Test My Code

June 10, 2011 by Webhead

Filed Under: Random Thoughts

MySQL – Get Next Auto Increment Value

May 24, 2011 by Webhead

Problem:

When adding an item to my mysql table, I needed to get the ID for the next inserted row.  The ID is just an auto increment column in the table.  At first I had:

select max(table_id) + 1 as next_table_id from tablename

I quickly realized how wrong that was.  When inserting ids 1, 2, 3, 4 and then deleting ID 4, my “next ID” query would return 4 instead of 5.  The MAX ID for a table varies depending on what is currently in the table and is not a reliable source for the next inserted ID.

 

Solution:

The query to use is:

select auto_increment
from information_schema.TABLES
where TABLE_NAME='tablename'
and TABLE_SCHEMA='basename'

 

An alternative solution is to use

SHOW TABLE STATUS WHERE name='tablename'

I have seen some comments that “SHOW TABLE STATUS” is not transaction safe.  Although I cannot find that in the MySQL documents.  Also if the table is partitioned, the first query should be used as documented here.

 

 

 

Filed Under: Random Thoughts

PHP Show All Errors

May 23, 2011 by Webhead

This is very basic, but I always forget the syntax to show all errors in PHP:

error_reporting(E_ALL);
ini_set('display_errors', '1');

http://php.net/manual/en/function.error-reporting.php

Filed Under: Random Thoughts

Hello world!

May 10, 2011 by Webhead

Welcome to My Monkey Do.  This is gonna be interesting.

Filed Under: Random Thoughts

  • « Go to Previous Page
  • Go to page 1
  • Go to page 2
  • Go to page 3

Primary Sidebar

Topics

apache apple bootstrap buddypress chrome cloudways cms css debug drupal eCommerce firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery kinsta linux localization mac os x ms sql mysql open source optimize php php 7.2 svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools
  • Uncategorized