Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by gristoi

  1. you have 4 choices:

     

    1. develop native app in android. - learn android

    2. develop native app in IOS - learn objective c

    3. develop web based app to deploy to stores ( i.e sencha touch ) - learn javascript

    4. make a responsive website - learn web design and css / js

  2. I agree with Ch0cu3r. You need to write this out, and then ask for help. Not just get someone else to do the work. Whats the point if you don't learn anything? And if the person / site giving you the task to do is asking you to use globals then i would seriously look elsewhere as this is a severly outdated methodolgy 

  3. no, there is no limit. I have json arrays with 100k + results. You are looking at the wrong thing. you need to see what your calendar is doing with the json results. and please be more clearer on excatly what is not working


  4. nested select or join:
    nested select:

    SELECT DISTINCT SysproCompanyJ.dbo.InvMaster.Description,
    SysproCompanyJ.dbo.InvMaster.LongDesc

    FROM SysproCompanyJ.dbo.InvMaster

    WHERE SysproCompanyJ.dbo.InvMaster.StockCode LIKE '%(SELECT substring(invW.StockCode, 1, (len(invW.StockCode) - 1)) as sStockCode,
    SUM(invW.QtyOnHand - invW.QtyAllocated)

    FROM SysproCompanyJ.dbo.InvWarehouse as invW

    WHERE Warehouse = 'SW'

    GROUP BY substring(invW.StockCode, 1, (len(invW.StockCode) - 1))

    HAVING SUM(invW.QtyOnHand - invW.QtyAllocated) > 0)%'

  5. databases are relational, so use them. You have duplication that you need to normalise. Part number and descirption could be moved into a parts table. then you could have an orders table. so would look like:

    // parts table
    
    id | part_number | part_description
     1     ABC           Switch
    
    //orders table:
    
    id | part_id | Qty | Cost | OEM_Resale
     1      1       1     1.00   3.5
     2      1       25    1.00   2.75
    
    
  6. think of extensibility in this. Sure, for now it is good in one file and you can 'see' all the code in one file. If connivence is your worry then that is what IDE's are for. Using one such as PHPStorm lets you search for code in hundreds of files in a matter of seconds, Links between class method names and adds support for helping you write good clean code.

     

    you need to take into consideration:

     

    What happens if the lines(brand) expand? will you maintain a single file with 4,5 6.....100 different product lines?

     

    What happens if you are asked to start producing the outputs in XML, or RSS? In procedural your code will end up getting messier and more fragmented.

     

    But dalecosp is right. Unless you want to learn OOP, or the code is not going to grow, then stick with procedural.

     

    Personally, when i moved into OOP many moons ago i have never looked back. t is very rare that i use anything but oop ( but there are occasions when i just need a procedural script)

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.