New answers tagged

14 votes
Accepted

Porting C-style socket to CPP class

Avoid using malloc() in C++ There are much better ways to allocate memory in C++ that are simpler and safer. First, in C++ you should use ...
user avatar
  • 34.7k
2 votes

Functions in PHP to run basic MySQL crud

It's good that you are using prepared statements. That's something that should be a no-brainer and yet it's something people often get wrong. However, there are a lot of weird things in this code. Let'...
user avatar
  • 851
2 votes
Accepted

Functions in PHP to run basic MySQL crud

The code is decent - simple to read, though the comments above the functions don't add much. It is a good idea to follow the PHP Standards Recommendations - and there is currently a draft for the ...
user avatar
3 votes
Accepted

The receive function for telnet client

Error handling You are already doing a lot of error handling, which is good, but you need to pay a little bit more attention to what kind of errors functions can return, and how to respond to them. ...
user avatar
  • 34.7k
3 votes

Functions in PHP to run basic MySQL crud

Just from a pure useability stand, I don't find these types of wrappers very useful. They work fine for the simplest test cases, but as soon as you want to do a basic join you're back to writing the ...
user avatar

Top 50 recent answers are included