Hello all,
I have an ID field in a table, let's say it returns 1, but when I use conditional logic to compare, it returns true if the ID is IN the field instead of an exact match. Is there a PHP function that will compare the ID, in this case 1, to ONLY those records in the table that are 1? I am getting 12, 13, 14, etc...
Thanks in advance.
ID returns more from table than the ID...
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: ID returns more from table than the ID...
I am not clear whether you are talking about PHP (e.g., $ID == 1) or SQL (e.g., SELECT * FROM foo WHERE ID=1). Can you clarify and post some code?
(#10850)
Re: ID returns more from table than the ID...
$id == `mbr__id'`;
$id = 'member_id;
?
What is the difference?
$id = 'member_id;
?
What is the difference?
Re: ID returns more from table than the ID...
orbdrums wrote:What is the difference?
Comparisonorbdrums wrote:$id == `mbr__id'`;
Assignment.orbdrums wrote:$id = 'member_id;
Your question still isn't terribly clear.
Re: ID returns more from table than the ID...
Thanks for explaining the difference between = and ==. That is what I needed! Very much appreciated.