Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gristoi

  1. you could follow the mvc pattern, or have a look at how symfony 2 deals with it by using repositories.
  2. you may want to look at using jquery and ajax to achieve what you want
  3. 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
  4. 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
  5. the forum is to help people who have problems with their code. if you want someone to do the work for you then you need to expect to pay them. if so post in the freelance section
  6. huh?
  7. you need to contact the developer of the third party script and ask them directly how to integrate this
  8. put user in backticks too
  9. turn on your error checking
  10. store the data in the db before making the request to paypal , but set a flag to say payment not received
  11. have a google on passing by value and passing by reference
  12. if you are asking for someone to do all the work for you then you need to post this in the freelance section.
  13. amazing tool google you know: http://redmine.lighttpd.net/boards/2/topics/5465
  14. 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
  15. what do you mean by "it writes out the actual words?"
  16. 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)%'
  17. DATE_SUB(checkin_date,INTERVAL 2 DAY)
  18. yep, no mysql_query()
  19. Firstly it is 2014 you should have no need to build raw ( and outdated ) ajax calls like this. Consider switching to a modern JQuery method for your ajax calls
  20. 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
  21. remember aswell using an inner join means records need to be in table on both sides, or no resuts
  22. you have no need to use a sub select: SELECT t1.*, p.* FROM detail t1 INNER JOIN posts p USING(content_id)
  23. sorry, didn't see the multidimensional comment: usort($arr, function($a, $b) { $a1 = $a["username"]; $b1 = $b["username"]; $out = strcasecmp($a1,$b1); if($out == 0){ return 0;} if($out > 0){ return 1;} if($out < 0){ return -1;} });
  24. do you not have a local copy of your website to test against? copy your code and database down locally onto your machine and see if you can replicate the error.
  25. 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.