PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
As always, thanks in advance for your help. I have a page that is returning participant information form the database including a TINYINT field which should return either 0 or a 1. The issue is that even when a participant has that value set to 0 in the database, it still appears in the loop as a 1. I wanted to debug to see if the variable was coming in correctly so I hardcoded a value to return a record with a 0 and it echoes correctly (at the bottom of my code below). The declared variable I am trying to loop is $Active = $ReturnedParticipants['Active']; After looking at this for quite some while I can not figure out what I am doing wrong in my loop. Does it have something to do with the field being a TINYINT. In SQL I would normally use a BIT setup for the field but I was unable to insert a 1 or 0 value in that field once created. It kept reading as a BLOB which is somehting I must say I am not aware of.
OMG....I can not believe I did not think of that.....ok....that brings me to another question....in this case where I have to be more specific with my column headers, I noticed that I can not do what I used to do in MS-SQL which would bring me here to $Active = $ReturnedParticipants['p.Active'];
However that returns no result at all....How would I do that in PHP?
dgny06 wrote:In SQL I would normally use a BIT setup for the field but I was unable to insert a 1 or 0 value in that field once created. It kept reading as a BLOB which is somehting I must say I am not aware of.