Skip to content

Cristian Radulescu

Software development tips&tricks

  • Home
  • Software Development
    • Software Development
    • PHP
    • Symfony2
    • Composer
    • Doctrine
    • MySQL
    • WordPress
    • Twig
    • JavaScript
    • React JS
  • Linux
    • Linux
    • Ubuntu
    • CLI
  • More
    • Back

Tag Archives: snippets

Insert value “0” for primary keys with auto increment in MySQL

In order to insert value 0 in a field that is set as primary key for a MySQL table you need to execute the following query prior to any insert query: SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”;

Posted byCristian RadulescuJuly 12, 2009January 26, 2018Posted inMySQL, ProgrammingTags: development, MySQL, primary key, snippets, tips and tricks5 Comments on Insert value “0” for primary keys with auto increment in MySQL

Remove blank lines from a textarea using Prototype

Here is a Javascript function used to remove blank lines from a textarea…

Posted byCristian RadulescuFebruary 18, 2009January 9, 2011Posted inHTML, JavaScript, ProgrammingTags: HTML, JavaScript, Programming, snippets, tips and tricksLeave a comment on Remove blank lines from a textarea using Prototype

Remove spaces from an input field with JavaScript

This is a small snippet to remove the spaces from an input field using JavaScript. It can be useful when you want a value without spaces, or when you want to replace the spaces from the input field with other characters.

Posted byCristian RadulescuDecember 10, 2008January 26, 2018Posted inJavaScript, ProgrammingTags: HTML, JavaScript, snippets12 Comments on Remove spaces from an input field with JavaScript

Recent posts

  • How to create a Composer plugin
  • First encounter with React JS
  • Add PDF export functionality in SonataAdminBundle
  • Beautiful strings and the PHP solution
  • Doctrine entities in Twig templates
  • Easy file sharing with Python SimpleHTTPServer
  • Understanding file permissions and ownership on Linux
  • Enable trackball pulse notifications for HTC Hero with CM7
  • Display random posts in WordPress
  • Get random results from a MySql table

Recent comments

  • webdesign2000 on Add PDF export functionality in SonataAdminBundle
  • Sree on Remove spaces from an input field with JavaScript
  • Faithap on Display random posts in WordPress
  • leila fahimi on Add PDF export functionality in SonataAdminBundle
  • dhafer on Add PDF export functionality in SonataAdminBundle
  • Zuhayer Tahir on Doctrine entities in Twig templates
  • MySQL: Insert value 0 for primary keys with auto increment – Albara Ramli on Insert value “0” for primary keys with auto increment in MySQL
  • amine on Doctrine entities in Twig templates
  • Cristian Radulescu on PHP CLI increase memory limit
  • Robert Johnson on PHP CLI increase memory limit
Cristian Radulescu, Proudly powered by WordPress. Privacy Policy