Jump to content

All Activity

This stream auto-updates

  1. Today
  2. INSERT INTO `Bank_Reason` (`ID`, `ReasonID`, `Reason`,`Colour`) VALUES (1, 0, '---SELECT','#000000'), (2, 1, 'Other',','#0000ff'), ^^ Again!?
  3. I fixed the wrong quote but there is still an error. When I put the code into Notepad++ Line 8 is a blank line under create table section. MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(3, 2, 'Virgin Bank','#000000'), (4, 3, '_Spare_2','#000000'), (5, 4, 'CT','#f' at line 8 DROP TABLE IF EXISTS `Bank_Reason`; CREATE TABLE IF NOT EXISTS `Bank_Reason` ( `ID` int(11) NOT NULL, `ReasonID` int(11) DEFAULT NULL, `Reason` varchar(20) DEFAULT NULL, `Colour` varchar(8) DEFAULT '#000000' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `Bank_Reason` -- INSERT INTO `Bank_Reason` (`ID`, `ReasonID`, `Reason`,`Colour`) VALUES (1, 0, '---SELECT','#000000'), (2, 1, 'Other',','#0000ff'), (3, 2, 'Virgin Bank','#000000'), (4, 3, '_Spare_2','#000000'), (5, 4, 'CT','#ff00ff'), (6, 5, 'Energy','#c51010'), (7, 6, 'Mobile','#27b30b'), (8, 7, 'Virgin_BB','#06b8b6'), (9, 8, 'MNOPF','#00aa00'), (10, 9, 'Water','#aa7700'), (11, 10, '@Shops','#ff0000'), (12, 11, 'Online','#7777ff'), (13, 12, 'Cash','#000000'), (14, 13, 'Pablo','#000000'), (15, 14, 'Amazon Prime','#000000'), (16, 15, 'Ebay/Paypal','#7a061c'), (17, 16, 'Argos/Store cards','#000000'), (18, 17, 'Alexa Music','#000000'), (19, 18, 'HSBC','#aa00aa'), (20, 19, 'Amazon Orders','#aa7700'), (21, 20, 'State Pension','#301de8'), (22, 21, 'Home Insurance','#000000'), (23, 22, 'Lottery','#000000'), (24, 23, 'Rent','#000000'), (25, 24, 'Private Health','#000000'), (26, 25, 'Credit card **','#000000'), (27, 26, '_Spare_1','#000000');
  4. INSERT INTO `Bank_Reason` (`ID`, `ReasonID`, `Reason`,Colour') VALUES ^ | unwanted single quote
  5. Hi. I have an exsisting table Bank_Reason. I want to add an extra columb 'Colour' to it. I am getting an error when I try to change it. I have done a drop table and recreate. Can any help with this extra columb please. I worked fine before. P.S. I have noticed that i was missing a (`). NEW line INSERT INTO `Bank_Reason` (`ID`, `ReasonID`, `Reason`,`Colour`) VALUES. Makes no diffrence. DROP TABLE IF EXISTS `Bank_Reason`; CREATE TABLE IF NOT EXISTS `Bank_Reason` ( `ID` int(11) NOT NULL, `ReasonID` int(11) DEFAULT NULL, `Reason` varchar(20) DEFAULT NULL, `Colour` varchar(8) DEFAULT '#000000' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `Bank_Reason` -- INSERT INTO `Bank_Reason` (`ID`, `ReasonID`, `Reason`,Colour') VALUES (1, 0, '---SELECT','#000000'), (2, 1, 'Other',','#0000ff'), (3, 2, 'Virgin Bank','#000000'), (4, 3, '_Spare_2','#000000'), (5, 4, 'CT','#ff00ff'), (6, 5, 'Energy','#c51010'), (7, 6, 'Mobile','#27b30b'), (8, 7, 'Virgin_BB','#06b8b6'), (9, 8, 'MNOPF','#00aa00'), (10, 9, 'Water','#aa7700'), (11, 10, '@Shops','#ff0000'), (12, 11, 'Online','#7777ff'), (13, 12, 'Cash','#000000'), (14, 13, 'Pablo','#000000'), (15, 14, 'Amazon Prime','#000000'), (16, 15, 'Ebay/Paypal','#7a061c'), (17, 16, 'Argos/Store cards','#000000'), (18, 17, 'Alexa Music','#000000'), (19, 18, 'HSBC','#aa00aa'), (20, 19, 'Amazon Orders','#aa7700'), (21, 20, 'State Pension','#301de8'), (22, 21, 'Home Insurance','#000000'), (23, 22, 'Lottery','#000000'), (24, 23, 'Rent','#000000'), (25, 24, 'Private Health','#000000'), (26, 25, 'Credit card **','#000000'), (27, 26, '_Spare_1','#000000');
  6. $surname_counts = array_count_values(array_map(fn($v)=>substr($v, strpos($v, '_', 0)+1), $names)); -> Array ( [jones] => 2 [smith] => 3 [doe] => 2 [jackson] => 1 )
  7. I really have no context with which to give you a "best solution" but a longstanding way of handling this is to have the customer website utilize an iframe that wraps your hosted site.
  8. To a degree, because you can create your desired list/count in one pass through the array. <?php $names = ['bob_jones', 'sam_smith', 'jane_doe', 'john_smith', 'jill_jackson', 'matt_jones', 'john_doe', 'emily_smith']; $lastNames = []; foreach ($names as $name) { $lname = substr($name, strpos($name, '_') +1); if (array_key_exists($lname, $lastNames)) { $lastNames[$lname]++; } else { $lastNames[$lname] = 1; } } var_dump($lastNames);
  9. if you post the code generating the array, someone could post an example, instead of just writing about how to do it.
  10. Correct. No database involved. The array is generated from other PHP coding.
  11. From the way the question was worded, it doesn't appear that the data is in a relational database.
  12. if all you want is a COUNT() per last name, you can do that in the query that's getting the data, with a GROUP BY last_name term. if you want the name data and a count for each last name, i would index/pivot the data using the last name as the main array index when you fetch the data, from wherever it is coming from.
  13. I have an array of first and last names joined by an underscore (eg: Sally_Smith). Ultimately, I want to count the number of people (elements) with the same last name. My thinking is to run through the array and explode each element to isolate the last names, then use array_unique to create an array of $lastNameOnly and eventually use this as a counting mechanism against the original array.. Am I over-complicating this?
  14. Yesterday
  15. @gizmola I appreciate all your help. Now I think we've come full circle and returned to my initial conundrum. If the business already has a minimal web presence with a registered domain, how can I incorporate MY form without making ripples in the pond. If I host it myself, then users are being re-directed. And if I put my code on the business domain server, then I no longer have exclusive access to it. What is the best solution for me?
  16. As requinix stated, not really with css, because css "styles" markup. You could inject an additional DOM element using javascript. I'm not suggesting that is a good idea, but it would work fine, especially if this "row" is static.
  17. If the form is a "web form" then host it, and store the data within your own infrastructure, and you've accomplished SaaS, with all the benefits of code ownership we've discussed. You do need to account for the fact that you'll be paying for hosting. There are many solid/reputable hosting companies that provide a virtual server with room to grow your application, where you'll know your price in advance. You also want the server to be in a DC that is co-located near to your customer, and these mid size hosting companies tend to have that type of coverage. Linode, Vultr, Hetzner and Contabo are a few of the better known companies with track records to compare and contrast. I would highly advise against using shared hosting. Given that you will be running a monolithic architecture, I'd suggest looking at 8gb vps's to give you room to run the mysql database as well as your webserver/php stack.
  18. @gizmola As stated, just starting with a simple form to register users and collect information (eg: name, address, email, phone) for an easy access point that might be used later for sales' campaigns. I guess the real question is: How do I optimize my earrings and ensure that I don't have my work ripped-off by unscrupulous sources?
  19. I don't really want to guess at what the application is, but SaaS would entail you hosting the application on your infrastructure and the customer using the functionality you provide within the app as an end user. There's no subterfuge involved in it. If there's some reason that a user would believe they were tricked in some way, then it's not SaaS.
  20. @gizmola it would seem that the Software as a Service model would be more in line with my thinking (since I fear my code being co-opted). How is this best implemented? In simple terms, if the customer wants users to complete a form, would I just re-direct them to a form on MY server? Wouldn't that seem a bit suspicious if detected?
  21. We are a Communication Platform as a Service (CPaaS) designed to streamline how businesses connect with customers across multiple channels. Our flexible, cloud-based solutions integrate communication tools directly into your apps or websites, enabling real-time engagement. Looking for a Tech Lead/Architect who is ready to take responsibility and assume technical leadership and architectural decision-making on our high-load platform. WHAT YOU WILL BE DOING: Developing architecture for new system modules that ensure high performance and scalability of high-load systems. Implementing horizontal and vertical scaling strategies to ensure stable system operation under increasing load. Optimizing system performance. Analyzing and optimizing database queries (MySQL, PostgreSQL) to ensure maximum performance. Coordinating the technical team, distributing tasks among developers, and monitoring their execution. Ensuring effective interaction between different technical teams, as well as between technical and non-technical stakeholders. Implementing and optimizing development processes, ensuring compliance with code quality standards. Critically analyzing and approving architectural decisions, making final decisions on task implementation. YOUR COMPETENCIES: Experience working with high-load systems. High proficiency in PHP (Laravel, Symfony) Deep knowledge of databases (MySQL, PostgreSQL) and query optimization. Experience with queue processing tools (Kafka, RabbitMQ) and caching (Redis). Experience working with Kubernetes and Docker. Experience with Linux platform (debugging and log analysis). Understanding of parallelism principles in PHP and the ability to emulate threads to ensure efficient process operation. Experience in designing and implementing architecture for high-load systems. Strong communication skills for effective interaction with stakeholders. Ability to critically evaluate task acceptance criteria and ensure compliance with code quality standards. WII BE A PLUS IF YOU HAVE: Experience in the telecom industry. Knowledge of SMPP and TCP/IP protocols (telecommunications systems). Experience in reengineering legacy systems. Knowledge of other languages. English at least B1. WE OFFER: You'll have the ultimate authority on technical decisions, shaping the future of our high-load platform. Skilled team. Mature management. Remote work; Competitive salary; 24 days of paid vacation. 3 days off if you need an emotional reboot. Holidays, vacation, sick leaves — according to the local legislation. Other benefits.
  22. If you're developing code for someone at a cost, typically they would expect to own that code or a license to that code in return for the payment they are making to you. Generally speaking, the "data" for a system is the property of the customer/business using your system. It's not unusual for companies to provide a separate "maintenance" agreement that covers a period of time, wherein the customer would pay you an amount to enhance it and fix bugs. You also could provide the system in a Software as a Service model, where you host the system and code, and provide the customer access to the application, without otherwise providing the system level access they would need to even see the code. As far as pricing, there are many ways to estimate and cost projects. Understandably companies tend to like to know a price for something, so you need to have a decent idea of what amount of time it will take you to build the features. You make this estimation in "ideal" time, which is the amount of time any feature might take if you are head-down and fully productive. Then add a reasonable amount of overhead to your ideal estimate (anywhere from 10-35% is not uncommon). Determine a reasonable market rate for your time, and in combination, you'll have a "by feature" estimate you can utilize as a fix bid, with associated milestones. Any project like this should involve a contract.
  23. In order to "upload" a file to a server, and make that "quicker" you need to have optimized the size of the photo on your workstation. PHP doesn't come into it.
  24. @Strider64 I think my intention (at first, anyway) was to increase upload speed (especially if a few images were involved) and avoid upload size maximum limits (that the server /hosting service enforces). Will this actually address the issue? Is there another reliable resolution?
  25. Last week
  26. I use Intervention using composer which is a very handy utility. // Load the image $image = Image::make($image_path); // Resize the image $image->resize(2048, 1365, function ($constraint) { $constraint->aspectRatio(); $constraint->upsize(); }); // Save the new image $image->save($image_path, 100); You can do other image manipulation with Intervention as well and pretty easily. I don't know if this is something you are looking for?
  27. Some time ago I was playing with PHP code to minimize the size of images. My primary purpose was to reduce the file size so that uploading would be quicker and thereby encounter fewer instances of exceeding the upload limits of the hosting server. It recently occurred to me that this was a futile exercise because once PHP was involved, the files at full size had already engaged with the server. Am I correct in my assumption? Is there a reliable way to approach what I had initially intended?
  1. Load more activity
×
×
  • 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.