hi,
I am in need of help again!!!
In quick terms, I am using mssql queries to populate a webpage. The result is two numbers displayed on the page. My question comes in when I want to do:
- make the result a link to another webpage/pop up excel.
- link is just another query that returns different output to excel.
for example:
query is total number of employees in new york. it returns 5 employees. when the number is clicked it opens xls with Title: empl and names of the employees...
query2 is total number of employees in new york but specific city. it returns 2 and again when clicked on number it opens xls with names of the emps...
I tried doing following but of course lot of mistakes...and long way to go
<? php
/*DB connections*/
/*get number of emps in same state
$queryEmp = "select count(empCat) as IE from employee where state = 'NY'";
$export=mssql_query($queryEmp);
$queryEmp2 = "select count(empCity) as cnt from EMPProfile where state = 'NY' and city = 'something' ";
$export=mssql_query($queryEmp);
$queryEmp3 = "select empno, empname from employee";
$export=mssql_query($queryEmp);
$fields = mysql_num_fields($export);
?>
<TR>
<TD colspan=1> State <BR></TD>
<!-- populates number on webpage -->
<TD> <?php echo $queryEmp ;?> </TD>
<\TR>
<TR>
<TD colspan=2> City <BR></TD>
<!--populates 2nd number on webpage -->
<TD> <?php echo $queryEmp2 ;?> </TD>
<\TR>
And then I get lost:
I have checked many php and excel code examples....many use mysql and some of them are freeware/shareware...i didn't want anything too complicated....just simple as stated above while learning from my peers like always....any help is greatly appreciated...