e_i_pi's Profile User Rating: *****

Reputation: 789 Master
Group:
Mentors
Active Posts:
1,676 (0.84 per day)
Joined:
30-January 09
Profile Views:
47,243
Last Active:
User is offline Jul 25 2014 12:17 AM
Currently:
Offline

Previous Fields

Country:
AU
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
Playstation
Your Car:
Mitsubishi
Dream Kudos:
75
Expert In:
Databases

Latest Visitors

Icon   e_i_pi has set their status

Posts I've Made

  1. In Topic: Update multiple tables in one query

    Posted 23 Jul 2014

    View Postjimzcoder, on 24 July 2014 - 10:40 AM, said:

    no emp_id is not a primary key i have. i would consider it as a foreign key since i have an auto increment column(unsigned int) in my table which serves as my primary key. there are just instances that the client needs to change the employee`s id for some reason. and emp_id column as a varchar datatype that contains atleast 10 characters example(2014-07-43). 2014- is the year of employment and 07 is the month of employment and 43 is the sequence number derived from auto increment id i have in my table.

    I don't know why you'd have an auto-increment field (1, 2, 3...) and yet use a natural key (2014-07-43,...) for your foreign keys. Surely it would make more sense to store the natural key on the employee table, and then foreign key constrain your child tables against the auto-increment field. That would save you all these painful UPDATE statements, which incur unnecessary load on the database. What happens if you miss one of the UPDATE statements for some reason? Bye bye data integrity :(
  2. In Topic: Best way of choosng frm Hndred thousands of options on a select field.

    Posted 1 Jul 2014

    Have you tried using jQueryUI Autocomplete? For 100k records, you'll need to use a remote data source otherwise you might cause browsers to hang.
  3. In Topic: print total post monthly archive

    Posted 23 Jun 2014

    I think your SQL is out. Assuming you're using MySQL, I think this is what you're after (thought I don't have MySQL in front of me to check the syntax):
    SELECT
    	COUNT(*) AS id,
    	year(`date`) AS `year`,
    	month(`date`) as `month`,
    	monthname(`date`) as mname
    FROM article
    GROUP BY
    	year(`date`),
    	month(`date`),
    	monthname(`date`)
    
    

    Note the use of backticks to escape column and alias names that are reserved words.
  4. In Topic: Trouble building a filter function

    Posted 23 Jun 2014

    You could also use WHERE priority IN (0, 1)
  5. In Topic: Click event not working with dynamic content

    Posted 17 Jun 2014

    I would use a class to do this, yes, and the same class for every dynamic element of the same type.

My Information

Member Title:
= -1
Age:
40 years old
Birthday:
June 24, 1974
Gender:
Location:
Australia
Years Programming:
4
Programming Languages:
HTML, XML, jQuery, PHP, SQL, MySQL, VBA, VBScript, PostgreSQL

Contact Information

E-mail:
Private
Website URL:
Website URL  http://www.artofwar.cc/

Comments

Page 1 of 1
  1. Photo

    cupidvogel Icon

    09 Jun 2012 - 11:30
    Ha ha, I really liked your "if(navigator.appName == 'Microsoft Internet Explorer')" theme!
  2. Photo

    Duckington Icon

    04 Apr 2012 - 00:57
    It's not live yet, still developing and then going into beta test. I haven't actually decided on a name yet, so no domain for it.
  3. Photo

    modi123_1 Icon

    13 Mar 2012 - 06:56
    Ha.. well good luck with it.. it's always a good butt of a joke.
  4. Photo

    RudiVisser Icon

    08 Mar 2012 - 15:20
    You know, I only just worked out what your avatar is. Love it!
  5. Photo

    RudiVisser Icon

    06 Sep 2011 - 00:37
    Thank you very much :-D
  6. Photo

    RudiVisser Icon

    06 Sep 2011 - 00:37
    Thank you very much :-D
  7. Photo

    e_i_pi Icon

    05 Sep 2011 - 22:15
    Ah thank you :) I'm a fan of minimalism, so I wwanted something nice and simple, plus you just can't go past red and black!
  8. Photo

    no2pencil Icon

    05 Sep 2011 - 19:52
    Love your avatar!
  9. Photo

    Sayid Ahmed Icon

    13 Jul 2011 - 14:02
    thanks for the add.
  10. Photo

    Dormilich Icon

    17 Feb 2011 - 13:25
    just wanted to congratulate for the funny thread title "OOP, PDOs, pain, tears".
Page 1 of 1