MySQL Forums
Forum List  »  PHP

Zohra please don't duplicate posts
Posted by: Peter Brawley
Date: June 08, 2019 09:38PM

It doesn't speed up response, in fact slows it, wastes everyone's time.

Re your request, I've no idea what your YT tutorial is telling you, but database code can't be debugged without the database and the requirement at hand, and what you describe in your post skips steps 1 and 3 and 4 of what's necessary for building a sound app ...

1 write the app requirement down to the minutest detail

2 develop a database model that meets every element of #1

3 build the db from #2

4 write pseudocode for all required operations defined in #1, test them logically against the db

5 write app code from pseudocode from #4 against db from $3, test & retest

You seem to have done #3 from a tutorial then jumped to #5. Your process wasn't designed to find errors till the code runs.

If it's me, I set aside the code for now, do steps 1 through 4, then wrote the pseudocode from #4 as comments into the code you showed. Then you'll see where you lost track of inventory.

You also forgot to code for errors: every database call that can fail in any way needs error handling.

Options: ReplyQuote

Written By
Zohra please don't duplicate posts
June 08, 2019 09:38PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.