PHP - Strategy For Keeping Development In Synch With Test?
I am wondering if there is an easier / better way to keep my development and test databases in synch.
When I develop, I may add tables or fields to existing tables. When I upload from the development server to the test server I can check and make sure that I include all of the programs that I have edited by using the filesystems last modified date. However, I keep track of new and changed tables in MYSQL manually. Is there an easy way, that I am just missing, to see last modified dates for tables within a db? Is there some other strategy I should be using. I hate missing a table and having the test server give errors on code I debugged once on the development server.
Similar TutorialsHello,
I'm starting using class and have a question for you guys :
Let's consider a class "customer". I want to code a search tool. Where should I put my search function ? Within the customer class ? In another "search" class ? Other solution ?
Thanks for help !
Hi, I was asked to create an app, wherein, the user may enter the email addresses of people manually, and it auto generates a random key. now this key will be used access such pages e.g proposal.test.com/ppc proposal.test.com/seo proposal.test.com/design so using the key for example => Sa22asdf it should appear like this proposal.test.com/ppc/Sa22asdf proposal.test.com/seo/Sa22asdf proposal.test.com/design/Sa22asdf without the unique key generated during the input of email address, the URL mentioned shouldn't be accessed by anyone.. now my question is, how to approach this thing in PHP ? I have done the input for email address and generation of random keys., but i don't know yet what to do or how to do the securing of pages using those keys ? This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=350418.0 am currently building the cart system of a product, now there is this part wherein, the non-logged-in OR logged-in user should also be able to see the items that he/she viewed, how to do that?., am not asking for code snippets , just give me some ideas/hints/strategies/tips that may help me get the big picture on how to do this thing and proceed coding. Hi guys, What techniques do you use to process, validate, and then show errors on your forms. Do you set an "action" to the same form and then handle errors somewhere? Do you use a separate script to process validation? What standards do you apply for the position of the error messages? Do you alter the "look" of any fields in errors (make them red for example)? Do you have a good standard strategy that can be applied for all forms in a re-usable fashion? Perhaps using functions? I am looking for a robust, user friendly (and coder friendly come to that) solution to this frequently encountered situation. Many thanks for any help. S Hello, I'm working on a very simple strategy based game site (mainly to expand my knowledge). What I basically want it to do is, you send a solider to an area which takes, say 20 seconds. After 20 seconds, he battles for 30 seconds, and then arrived back home which takes another 20 seconds. All the user is going to be seeing is a 'status' echo'ed text saying "Arriving in 00:??", "Battle Over in 00:??", and "Home in 00:??". So its just using a time counter. But what makes it more complicated, is that I want the time progress to be saved (datebase), so say I have to wait 50 seconds, I can sign off, go on another computer, sign in and still see my timer going down according to the time that has just passed. So, what I've done so far is, have 4 variables: $realTime - Holds the actual time in seconds. $waitingTime - Holds how long I need to wait. (this is stored in my DB) $differenceTime - Difference between real time and my waiting time. (loaded from my DB) $soliderProgress - Progress of the solider, so: Arriving, Battle ... (stored on DB) Code: [Select] $realTime = date("s"); //soliderProgress is 'Starting' by default if(soliderProgress == "Starting"){ //solider is moving to area $differenceTime = $realTime + $waitingTime; $SQL = ("UPDATE users SET differenceTime='$differenceTime' WHERE username='$username'"); soliderProgress = "Arriving"; $SQL = ("UPDATE users SET soliderProgress='$soliderProgress' WHERE username='$username'"); } if(soliderProgress == "Arriving"){ echo "Arriving to area"; if($realTime >= $differenceTime){ //timer is complete soliderProgress = "Battle"; $SQL = ("UPDATE users SET soliderProgress='$soliderProgress' WHERE username='$username'"); } } This kind of works, but sometimes my $differenceTime is higher than 60 which messes it up, and also the timer isn't live ... so I have to keep refreshing the page I am refactoring entire collective scattered SQL from my legacy codebase, and into separate classes, and looking for some structure to put it into. Right now I have folders effectively called `DataFromDB` - contains classes that accepts whatever parameters are given, and returns pure data back to the user `DAO` - Data Access Object, which takes that raw data from DB and makes sense out of it and prepares it for consumption by the model/business logic layer objects. That is: - src (folder) |- DAO (folder) | - ProductADAO (classes - take data in, return consumable objects out) | - ProductBDAO | - ... | - ProductZDAO |- DataFromDB (folder) | - ProductAData (classes - contain methods to query pure result sets from DB) | - ProductBData | - ... | - ProductZDataWhenever I need to make a new SQL or refactor an old one I do this: What is this SQL doing? Is it operating on `SomeObjectX`? If yes, find/create class called `ObjectX`, and add a method to it, extracting pure data from DB, put it into `DataFromDB` folder. Write the `DAO` object if needed to transform data into a consumable object. Use the object as is in my code. Does this look like a good strategy? Is there a better one? My problem with this one is that before (now) all the SQL is tightly coupled and is included into the multiple business classes. Using the above strategy will mean I am to be creating many many classes, a lot of classes, most likely one for every few SQL statements. The pros is that it seems like I will achieve a level of code modularity that I wanted. Sooo i got this idea but i dont know the line of code i should write +im an amateur coder. Anyone know how to make the 123d catch into a web application. Just gv me a start and ill modify the code slowly. And 1 more thing.. Does anybody know how 123d catch was able to combine the pictures into 3d. Like if you know can u also gv me the code.. appr3ciated alot. and also do u know how to make like if someone press the pic and moves to the left the 3d picture will move to the left also Hi, I'm not sure if this is the right place to post this but it seems to be acceptable. Please let me know if it's out of line, though. I recently started learning PHP and am going through PHP and MYSQL Web Development. It seems like a pretty good book so far. Currently I'm working through the code in chapter 1 and am running into an issue. From what I can tell, the code I should have at this point is as follows: <html> <head> <title>Bob's Auto Parts - Order Results</title> </head> <body> <h1>Bob's Auto Parts</h1> <h2>Order Results</h2> <?php // create short variable names $tireqty = $_POST('tireqty'); $oilqty = $_POST('oilqty'); $sparkqty = $_POST('sparkqty'); echo "<p>Order processed at "; echo date('H:i, jS F Y'); echo "</p>"; echo "<p>Your order is as follows: </p>"; echo $tireqty.' tires<br />'; echo $oilqty.' bottles of oil<br />'; echo $sparkqty.' spark plugs<br /'>'; ?> </body> </html> Within the PHP script, two particular blocks of code seem to be giving me problems: $tireqty = $_POST('tireqty'); $oilqty = $_POST('oilqty'); $sparkqty = $_POST('sparkqty'); and echo "<p>Your order is as follows: </p>"; echo $tireqty.' tires<br />'; echo $oilqty.' bottles of oil<br />'; echo $sparkqty.' spark plugs<br /'>'; Without these two blocks, the rest of the PHP executes but when I add one or both of these the PHP doesn't show up at all; instead it only executes the HTML and the output from the PHP doesn't show up. IF I remove these and only keep the "Order processed at" part of the script, that part executes fine. I've gone through the code in the book and it seems like what I have is correct. As soon as I try to define or call any of the variables, it seems to break the code. Any ideas? Sorry to bother you with such a basic question but I can't seem to locate a problem with this code based on what I've been taught so far. Thanks! If any of you have developed mobile apps before I could really use some advice, please. I have never made one, and would like to for my website. I just need to query my database and display the information. From what I have been able to put together so far, I know that I can use css and jquery fine. My main question is: can I use php to query the mysql database? Pretty much I am a novice, so if using these languages together will not work, please feel free to suggest combinations that would be better. Although, I am trying to avoid as much object oriented stuff as I can, because I just don't get it entirely, but I'll still take the suggestion. Thanks. Hi all, Php and web development wannabe, started HTML in about 2006 for my ebay listings, CSS came shortly after but it wasn't until maybe 2009 when I used my first 'someone-else's-php-script' to implement a dynamic breadcrumb. Although I have trouble reading volumes of text, a lot of discussions on code draw me in. I end up taking in a lot but in a totally non-structured way. After lots of googling, reading and some more practice of putting 'other-people's-php' into action I found I understood that breadcrumb... Sort of. I merrily tore out over half the code and refactored using ternary operators - I can't see why people remove those to increase readability?? OFC I lost every hint of error management! Now I've heard of error management I try to envisage what might go wrong and print messages to screen if "something unexpected happened". So I've been bumbling along solving problems for specific tasks and asking a lot of questions - But I've never joined a php forum! Formulating a question that's not embarrassing to ask, usually ends with me answering my own question and when I do want to put something out there, I'd rather fill up Yahoo Answers (A few very good and very generous users on there!) with my gibberish than contaminate someone's proper, serious, scripting forum. So anyway, I had a question to ask earlier, YA seems to be running out of steam and I only half answered it myself so here I am... Hi! This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=347622.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=349906.0 Hi all. Does anyone use Localstack to for local AWS development? I'm currently developing on a system that uses numerous AWS SQS queues, AWS ElasticSearch, AWS Redis, and many, many S3 buckets with about three dozen PHP-based micro-services; I've built a local development environment consisting of containers using several Docker images, one of which mocks AWS using a Localstack image. This works, for the most part, but I find that the Localstack instance just ... stops working. It - after a random amount of time, and intermittently if more often than not - won't process any of the queues that the system uses, or will drop bucket contents despite being set up for persistence (the `DATA_DIR` objective is set to `/tmp/localstack/data` as instructed in the README). I get the impression that Localstack is fairly widely used for local AWS development, so I have to assume if this was a normal situation I'd've found it in my searching, but so far it doesn't seem to be a big deal. I'll post the docker-compose file here if it helps, but does anyone have any experience with a similar situation and feel like sharing tips? Did it work, did it not, do I need to convince my company to pay for the pro version, do I need to do a modified rain dance, etc? As always, thanks in advance for any thoughts or advice. Chrome? Edge? Other? Had a bad experience with Edge. If development tools make one better than the other - what tools? And if you are using PHPStorm maybe the choice of browser is less important? No? Edited June 26 by sen5241bThis topic has been moved to Editor Help (Dreamweaver, Zend, etc). http://www.phpfreaks.com/forums/index.php?topic=351013.0 Hello fellow coders!
We are looking for an experienced developer to make a custom rating hook voor IP Board (invision Power).
We have a few requirements. One of them is that you are based in the EU (and under circumstances US based).
If this sounds interesting to you, please have a look at the requirements, some additional info and the application form here.
Thanks in advanced!
We aim to close the application period on February 1th.
Edited by cssfreakie2, 16 January 2015 - 03:36 PM. Hey guys just thought I'd introduce myself as it's a polite thing to do.
My name is Nick I am currently a front end developer and love learning new technologies so it looks like PHP is my next step.
I hope to learn and give whatever knowledge I can back
HI All,
I need some suggestions on how to proceed on with component development. and any logic code or similar coding will be very much appreciated.
The component should display the list of contents displaying some columns from a table(ie.,scncontent) from database similar to web links component along with the tool bar (new,edit,publish,unpublish,trash etc., actions ) and with pagination also . This component should be designed with MVC architecture. On clicking new or edit icons, a form should be opened and data should be saved or updated to database.
Len M. Kaiser Web Design is a freelance custom web design firm specializing in web design & development including forums, shopping carts, content management systems, & blogs skins and maintenance. I follow the Wc3 standards for coding and make sure that the sites & skins I create are 100% XHTML compliant. I also create complete 100% table less designs for a web site and some skin depending upon the template structure that is already built in. Len M. Kaiser Web Design is an affordable North Charleston, SC based freelance web design firm that also serves clients all over the world. I specialize in web design, development, maintenance, & custom vBulletin related services such as vBulletin 3 & 4 styles (skins), installs, template coding, upgrades & maintenance. I have 8 years of experience in the freelance web design business & 15 years experience working with vBulletin forums and offer a hands on, individual approach with each and every client. I offer totally unique designs for your web site, forum, CMS, blog or e-Commerce site. I also have experience in various other PHP scripts such as XenForo, Wordpress, Joomla, OSCommerce, CubeCart, phpBB, Drupal, Magento, X-Cart and more! Check out My Services for a more in depth listing of what I can do for you and your business or hobby site. I offer free quotes for potential clients. Services I offer: 1. Custom web design & development 2. Custom forum skins such as vBulletin, XenForo, phpBB, MyBB, etc 3. Custom E-Commerce skins such as OSCommerce, X-Cart, Magento, CubeCart, ZenCart etc. 4. Custom CMS skins such as Joomla, Drupal, iScripts SocialWare etc. 5. Custom Blog skins such as Wordpress, Tumblr, Blogger etc. 6. Web site Maintenance including backups, web site moves, some hosting setups etc. 7. Installations & upgrades of any PHP script, plugin, component or software. Thanks, Len M. Kaiser http://lenmakiser.com |