Reputation: 943 Master
- Active Posts:
- 2,358 (2.04 per day)
- 15-February 11
- Profile Views:
- Last Active:
- Mar 31 2014 08:46 AM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
- Expert In:
Posts I've Made
Posted 26 Feb 2014Well technically there's a redirect directly after your echo. Remember all PHP code is ran before anything even reaches the client/browser. Therefore PHP would have already executed the redirect thus not displaying the echo statement you have there.
Try removing the header('location ....') line to confirm that rows are actually being deleted OR pass the number of rows being deleted as a GET request to the page you're redirecting to.
header('location: index.php?result=' . $delete->affected_rows);
Posted 26 Feb 2014Where are the other delegates? So far I don't see a delegate that accepts a string and returns a string in ConsoleAPI.cs. If there isn't one then that's your problem right there.
public delegate string <DelegateName>(string str);
Posted 26 Feb 2014Create a handler for the KeyPress event and then check which key was pressed within the e.KeyChar (don't quote me on the variable here, all from memory). If the KeyChar is not allowed then change e.Handled to true. This will ensure that the key is not processed.
You can also set the same handler for all of your 81 text boxes' KeyPress event.
Posted 21 Feb 2014@modi123_1 Could be behind a firewall or the pictures don't exist anymore. I'm getting the same issue.
@OP Great tutorial. Greatly simplifies the Entity Framework. Keep it up.
Posted 21 Dec 2013Trees aren't too difficult to generate. My file system was structured in a way that I would grab the PATH and generate the root from there. For instance, /repairs/laptop/screens/index.php would be the PATH and then a simple string split and popping off the last element then a join with '->' into a single string would do the trick.
From the looks of things your categories are defined in the database. It all depends on the relationship of each category. If a category such as SCREEN REPLACEMENT is linked with just one parent category then it's quite easy to follow the tree upwards. If SCREEN REPLACEMENT has multiple parents then determining which parent to use is going to be another story. A recursive function is a good idea but it's a lot of database calls. Note that this will occur each time a page is loaded since the tree will be regenerated unless you're using caching. I would recommend you using a function at the database level that will generate the tree for you. Basically you get the parent ID of a category then you get the parent ID of the parent and so on until you can't get a parent. Also recommend caching. Check out Smarty Template Engine.
- Member Title:
- Changed Man With Different Priorities
- 23 years old
- February 13, 1991
- Years Programming:
- Programming Languages:
- Website URL: