Search Results

Search found 4 results on 1 pages for 'cdburgess'.

Page 1/1 | 1 

  • Does constantly checking the documentation make you a bad coder?

    - by cdburgess
    When writing PHP code for any given project, do you find you can write code off the top of your head? Or do you make multiple round trips to php.net? If it is the later, can you still be considered a good coder. This is a legitimate question as I find I have difficulty always remembering all of the functions that are available to me so I find I use php.net as a crutch. Is there anyway to improve this?

    Read the article

  • What defines writing PHP?

    - by cdburgess
    When writing PHP code for any given project, do you find you can write code off the top of your head? Or do you make multiple round trips to php.net? If it is the later, can you still be considered a good coder. This is a legitimate question as I find I have difficulty always remembering all of the functions that are available to me so I find I use php.net as a crutch. Is there anyway to improve this?

    Read the article

  • Dynamically removing records when certain columns = 0; data cleansing

    - by cdburgess
    I have a simple card table: CREATE TABLE `users_individual_cards` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` char(36) NOT NULL, `individual_card_id` int(11) NOT NULL, `own` int(10) unsigned NOT NULL, `want` int(10) unsigned NOT NULL, `trade` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `user_id` (`user_id`,`individual_card_id`), KEY `user_id_2` (`user_id`), KEY `individual_card_id` (`individual_card_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; I have ajax to add and remove the records based on OWN, WANT, and TRADE. However, if the user removes all of the OWN, WANT, and TRADE cards, they go to zero but it will leave the record in the database. I would prefer to have the record removed. Is checking after each "update" to see if all the columns = 0 the only way to do this? Or can I set a conditional trigger with something like: //psuedo sql AFTER update IF (OWN = 0, WANT = 0, TRADE = 0) DELETE What is the best way to do this? Can you help with the syntax?

    Read the article

  • How to limit data to users who own it without limiting admin users in CakePHP?

    - by cdburgess
    Currently I am writing an application where I have multiple users. They have data that should only be visible to them and not the other authenticated users in the system. I also have administrators who manage the system and have access to all of the information. What is the best way to limit users to their data without limiting admin users? Currently I am using a callback to limit the queries by user, but the admin will get the same limits. So I need to know a better way to do it. More importantly, the right way to do it. For example, I want the standard user to be able to see their user information only and be limited to CRUD operations on their information only. The admin, however, should be able to see ALL users and CRUD ALL user data. Any ideas?

    Read the article

1