AJAXing MYSQL with PHP
Posted: Thu Jun 11, 2009 7:05 am
Hi there.
Just a bit of help....
I have implemented AJAXing with MYSQL & PHP....It's going smoothly .... Just a bit of problem with MYSQL query....
my url is something like http://abc.com#xyz ..... I generate data based on that xyz.....xyz is the department
function getSummary($department) {
mysqlQuery = "SELECT * FROM table where dptlist=$department";
...
...
}
function getSummary($deparment) {
mysqlQuery = "SELECT * FROM table where dptlist=\"xyz\"";
...
...
}
The first function is not working while the second one is working ....... how to overcome this problem ???? ..... I don't want to explicitly mention $department in all my switch cases ...... ny help ???
Just a bit of help....
I have implemented AJAXing with MYSQL & PHP....It's going smoothly .... Just a bit of problem with MYSQL query....
my url is something like http://abc.com#xyz ..... I generate data based on that xyz.....xyz is the department
function getSummary($department) {
mysqlQuery = "SELECT * FROM table where dptlist=$department";
...
...
}
function getSummary($deparment) {
mysqlQuery = "SELECT * FROM table where dptlist=\"xyz\"";
...
...
}
The first function is not working while the second one is working ....... how to overcome this problem ???? ..... I don't want to explicitly mention $department in all my switch cases ...... ny help ???