Click here to Skip to main content
15,887,746 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
QuestionThe future of php Pin
chanricle14-Oct-11 16:15
chanricle14-Oct-11 16:15 
AnswerRe: The future of php Pin
Luc Pattyn14-Oct-11 17:15
sitebuilderLuc Pattyn14-Oct-11 17:15 
GeneralRe: The future of php Pin
Richard MacCutchan14-Oct-11 23:05
mveRichard MacCutchan14-Oct-11 23:05 
NewsOneiricOcelot - Ubuntu 11.10 released yesterday (13 October 2011) Pin
AditSheth13-Oct-11 18:28
AditSheth13-Oct-11 18:28 
GeneralRe: OneiricOcelot - Ubuntu 11.10 released yesterday (13 October 2011) Pin
Albert Holguin14-Oct-11 7:58
professionalAlbert Holguin14-Oct-11 7:58 
GeneralRe: OneiricOcelot - Ubuntu 11.10 released yesterday (13 October 2011) Pin
AditSheth16-Oct-11 21:16
AditSheth16-Oct-11 21:16 
GeneralRe: OneiricOcelot - Ubuntu 11.10 released yesterday (13 October 2011) Pin
Albert Holguin3-Nov-11 11:40
professionalAlbert Holguin3-Nov-11 11:40 
QuestionProblem with a query Pin
MacRaider413-Oct-11 8:02
MacRaider413-Oct-11 8:02 
Ok, I give up... If I use the commented out SQL I get nothing, however if I use the SELECT * the "match" is hit. I'm running out of ideas. I've tried removing the ' around the variable, I added periods around it and still nothing. If I just type the value in I'm looking for 'John Smith' for example it finds it, just not when I use the variable...
PHP
echo "<p>myusername should = " . $empUserName . "</p>";
//$SQL = "SELECT * FROM empComm WHERE name = '$empUserName'";
$SQL = "SELECT * FROM empComm";
$result = mysql_query($SQL);
echo "Connected";
while ($db_field = mysql_fetch_assoc($result)) {
//echo "TEST";
	if($db_field['name'] = $empUserName){echo "match<br />";}
print $db_field['ecID'] . "<BR>";
print $db_field['name'] . "<BR>";
print $db_field['password'] . "<BR>";
//print $db_field['Address'] . "<BR>";
}

That first line is correct it displays myusername should = John Smith

The table only has 3 fields, ecID, name, password and really I only want to get the ecID. Well actually I was doing a join to make life easier but I wasn't getting anything so I just created this simple query and still nothing. I'm sure I'm forgetting something simple.
Thanks in advance!!!
AnswerRe: Problem with a query Pin
Graham Breach13-Oct-11 9:56
Graham Breach13-Oct-11 9:56 
AnswerRe: Problem with a query Pin
Luc Pattyn13-Oct-11 11:33
sitebuilderLuc Pattyn13-Oct-11 11:33 
AnswerRe: Problem with a query Pin
Mohibur Rashid13-Oct-11 17:05
professionalMohibur Rashid13-Oct-11 17:05 
AnswerRe: Problem with a query Pin
arya168515-Oct-11 3:02
arya168515-Oct-11 3:02 
QuestionMP3 Songs Download Website CMS Pin
sadiqabbas13-Oct-11 7:11
professionalsadiqabbas13-Oct-11 7:11 
QuestionYahoo Messenger Invisible Checker PHP Script Pin
sepehrooo11-Oct-11 12:39
sepehrooo11-Oct-11 12:39 
QuestionPlease help me Pin
yornsocheat2-Oct-11 17:06
yornsocheat2-Oct-11 17:06 
AnswerRe: Please help me Pin
Richard MacCutchan2-Oct-11 23:08
mveRichard MacCutchan2-Oct-11 23:08 
AnswerRe: Please help me Pin
Mohibur Rashid5-Oct-11 16:58
professionalMohibur Rashid5-Oct-11 16:58 
AnswerRe: Please help me Pin
wenbin.wu21-Oct-11 15:49
wenbin.wu21-Oct-11 15:49 
Questionسلام به همه ایرانی های عزیز Pin
rahmani12328-Sep-11 21:37
rahmani12328-Sep-11 21:37 
AnswerRe: سلام به همه ایرانی های عزیز Pin
Richard MacCutchan30-Sep-11 22:00
mveRichard MacCutchan30-Sep-11 22:00 
GeneralRe: سلام به همه ایرانی های عزیز Pin
Luc Pattyn19-Oct-11 2:01
sitebuilderLuc Pattyn19-Oct-11 2:01 
GeneralRe: سلام به همه ایرانی های عزیز Pin
Richard MacCutchan19-Oct-11 2:28
mveRichard MacCutchan19-Oct-11 2:28 
Questionencode & decode Pin
mryazdani22-Sep-11 10:02
mryazdani22-Sep-11 10:02 
AnswerRe: encode & decode Pin
Luc Pattyn22-Sep-11 10:30
sitebuilderLuc Pattyn22-Sep-11 10:30 
GeneralRe: encode & decode Pin
mryazdani22-Sep-11 10:57
mryazdani22-Sep-11 10:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.