[PHP] Unbuffered Reads

2005-06-05 Thread Steven James Samuel Stapleton
Is there any way to perform an unbuffered read in PHP when reading from STDIN? I.E. if I have the code - $chr = ""; while(!feof(STDIN)) { $chr = fgetc(STDIN); //I could just as easily do fread(STDIN, 1) if($chr == " ") break; } - and enter the follo

[PHP] mysql_select_db error

2004-10-30 Thread Steven James Samuel Stapleton
Relevant information: Windows XP Pro SP2 PHP 5.0.2 MySQL 4.0.21-nt command line (not server-side) mysql_select_db returns no errors, and does not result in a mysql_error(), however, later queries result in errors suggesting that the switch failed: //I'm having problems with mysql_select_db("DBNA