Hi everyone, I am quite a novice at php but I have created some helpful scripts that fetch data
from a ms access database that is used by our POS program at work ( a spa/salon)
My boss asked me to create a table kind of like this
which breaks down which clients an employee has seen and what months they have visited.
I've started by putting all the appointment data into an array
here my code
Code: <?php
$cn = odbc_connect(edge,admin,sharp);
$sql = "SELECT Code,FName,LName FROM Employees";
$res = odbc_exec($cn,$sql);
while(odbc_fetch_row($res))
{
$employees[odbc_result($res,'Code')] = array(fname=>odbc_result($res,'FName'),lname=>odbc_result($res,'LName'));
}
foreach($employees as $code => $details)
{
$sql2 = "SELECT ApptDate,CliDesc FROM Appointments WHERE EmpCode='".$code."' AND CliType<>'none'";
$res2 = odbc_exec($cn,$sql2);
while(odbc_fetch_row($res2))
{
$employees[$code]['appointments'][odbc_result($res2,'CliDesc')][] = odbc_result($res2,'ApptDate');
}
}
?>
I just can't wrap my mind about how I can create a table now...
Any suggestions or ideas would be awesome.
Thanks
PS
I have uploaded the sample database that the program demo comes with if you want to play around.
http://www.breze.ca/sample.mdb
Thanks for any help
retrieving images from mysql database using php
So I've been trying to figure out how to store images in a mysql database, and as far as i can tell the images are stored but getting them out seems to be the problem. when i try to go to the page on
Ajax not working on IE 6 for Windows CE
I've created a webpage which uses the classis Ajax in following format:view plaincopy to clipboardprint?function mytest() { try { xmlHTTP = new XMLHttpRequest(); } catch (e) {
Can we convert non uni code system into unicode
Hi All,
How to submit a form to the same page?
I have a table containing information about books in my library and this table has the following columns: id, title, category. What I want to do is to make a form that will allow me to sort these
Problem with PHP code- simple contact form
Hi Folks, I'm relativily new to PHP; I know HTML and CSS stuff but I have a problem- I have a contact form with PHP code in it- grabbed it from the sitemaster website. Unfortunately my form isn't
What makes a script your own?
If someone finds a login script online, and changes some variable names around and some other minor adjustments. Is that considered there own script? What would define a script as being yours? I
Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and works fine EXCEPT I want to add the strip slashes bit to it so it will save what I type in. However,
Hits this week counter
I have a counter on my site that tracks hits, IP's, etc. into a mySQL database. It also includes the date in the entry. The code I'm using, that's not working, to try and retrieve the amount of hits
Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web browser. http://127.0.0.1:12345/I assumed that the following would detect that something was trying to
javascript in php code causes page to display white
Hi All,Odd one this, I've got the following code (below) which is a simple log in form. The client wanted a pop to inform you when you've not completed a field and an asterix to appear.This is fine.