Can someone please tell me what this command means exactly? The part I don't understand is ",NULL as EventID". Thanks.
Code:$query = "SELECT categories.*, NULL as EventID FROM categories WHERE IsActive = 1 AND PkID > 0 ORDER BY CategoryName";
Can someone please tell me what this command means exactly? The part I don't understand is ",NULL as EventID". Thanks.
Code:$query = "SELECT categories.*, NULL as EventID FROM categories WHERE IsActive = 1 AND PkID > 0 ORDER BY CategoryName";
I don't understand why NULL either, which is why I am asking. I didn't write the code. I just have to make it work and some of it does weird stuff and I'm trying to understand if there is an error. I hate supporting other people's code. Is it even a correct statement? What does "NULL as EventID" mean?
it is a mysql querry calling the categories table or database and i think it is attempting to print the categories but hide the database id for that category this may help with why i am not sure with out seeing more code.
problem with null
kuau (07-11-2008)
Is it possibly a shorthand way of saying:
$EventID = "NULL";
SELECT * FROM categories AS EventID WHERE...
PS. We ended up dropping this software package because the guy who sold it to us (and who wrote it) was a total jerk, and it didn't work properly & he was unwilling to address the problems. Life is too short. Geesh... open source is definitely the way to go. But I am trying to learn MySQL and could not find this usage in the MySQL documentation. Maybe that's why it didn't work haha.
Bookmarks