I am trying to write a csv file. Seems to work fine except I don't get a carriage return. So, when I import the file into Excel, it's one long string. Here is the code I use:
$line = $StudentLogin . ',' . $Enrolled . ',';
$fout = fwrite($f_stu, $line);
Obviously, the "comma" at the end is not the answer. So, what is?
The other problem I have is that I need to check a field from MySql db to see if it is a "null". I know this is not a php issue but I was hoping somebody could help me on this. My code:
$query = "SELECT *
FROM students
WHERE S_Enrolled < '$AR_Date'
OR S_Enrolled = '????????'
";
Where I have the ???? I need to check for null values.