Recent content by Lews_Therin

  1. L

    PHP - Need help banning IP's from a form!

    Should be pretty easy, assuming you know the basics of connecting to a database with PHP. Just have a table of banned IPs, and add to them whenever the form is called. Make sure you've got strong security on the banform, or you'll be in a world of pain.
  2. L

    PHP, MySQL restore spaces in dir/file names

    That is the correct way. Are you sure the file exists at the path you are passing?
  3. L

    C++: cin from a shell command?

    Is that the actual command you want to run? If so, it will be far easier to simply code it in C rather than using shell commands. If the shell line can't be programmed in C for some reason, look into something like a FIFO or socket. Put one in /tmp, send output to it from the shell, and...
  4. L

    Getting a MySQL query to return a specific format

    I'm starting to think that'll be needed. A separate query to find the providers, construct a new query using that, then run the second query.
  5. L

    Getting a MySQL query to return a specific format

    I've gotten closer - this is the query now: SELECT FirstVisit, COUNT(IF(Provider="AAAA",1,NULL)) AS "AAAA", COUNT(IF(Provider="BBBB",1,NULL)) AS "BBBB", COUNT(IF(Provider="CCCC",1,NULL)) AS "CCCC" FROM proc_log GROUP BY FirstVisit ORDER BY FirstVisit; It gives the results I'm...
  6. L

    Getting a MySQL query to return a specific format

    This is my current query: SELECT FirstVisit, COUNT(*), Prov1 FROM pat_dat GROUP BY FirstVisit, Prov1 ORDER BY FirstVisit; Which produces output like this: +------------+----------+-------+ | FirstVisit | COUNT(*) | Prov1 | +------------+----------+-------+ | 2005-12-06 | 1 |...
  7. L

    Can I convert a Word Doc file into HTML using PHP

    You may compile it yourself, or grab a binary. If you're running Linux/Unix, it will probably be available in your package management system. If you're running Windows, grab a binary from GNUWin32. Grab the setup program, and you shouldn't have to worry about dependencies. To get the HTML...
  8. L

    Can I convert a Word Doc file into HTML using PHP

    Try wv. It won't be perfect because of the doc format's closed nature, but should work well enough.
  9. L

    Quick question about atoi

    Check if its value is between 48 (0) and 57 (9). Eg, if (x[i][j] >= 48 && x[i][j] <= 57){ ... }
  10. L

    Quick question about atoi

    You are misunderstanding both atoi and character strings. for(j=0;j<4;j++){ ... } This will limit the size of the numbers to 4 digits, which you probably don't want. for(t=0;t<10;t++){ if(atoi(x[i][j])==0){ buffer++; printf("%d",buffer); printf("\n%d,%d\n",i,j); }...
  11. L

    Is this bad C++ code?

    It will work, but you shouldn't use it. If you want strict checking, try adding the -ansi and -pedantic flags.
  12. L

    c++ compiler

    The point of MinGW is that it does not require cygwin. If yours did, I bet you installed it incorrectly. More likely, you were using the Cygwin compiler and merely thought it was MinGW.
  13. L

    C++ , need to count lines in an open file

    Two hints: Do you know what the code is for the newline character(s)? Do you know how to read from a file without allocating an array?
  14. L

    Why does webmail suck?

    I'm not sure how the setup is on FreeBSD, but on (Gentoo) Linux it's literally two commands to setup mySQL in a secure configuration once it's installed. Probably the same for other databases, such as SQLite and PostgreSQL. I'm sure it will be easier than creating your own half-database setup.
  15. L

    Why does webmail suck?

    Why are you so reluctant to use databases?
Back
Top