
wellscam
Members-
Posts
34 -
Joined
-
Last visited
Never
Everything posted by wellscam
-
So I can create a scheduled task on the server to run the script, but how do I write that kind of page that will do what I want it to? Anyone?
-
This is actually hosted locally on one of my server, I'm just very new to all of this. It's on a Windows Server 2003 running IIS 6.0.
-
I have a SQL Querry that I need to run every 30min. I'm hoping there is a way to have it automatically run on a web page then IF there are results, send me an email. The query was written in Access, so I need to convert it to PHP and see if there is a way to have some sort of scheduled task or something run the page every 30min. Does anyone know how to do this? Here is the query: SELECT AllInfo.IO, AllInfo.CO, AllInfo.DateTime, AllInfo.Extension, AllInfo.Duration, AllInfo.AC, AllInfo.PhN FROM AllInfo WHERE (((AllInfo.IO)="Out") AND ((AllInfo.DateTime)>DateAdd("n",-30,Now())) AND ((CInt([AllInfo].[CO])) Between 1 And 23) AND ((AllInfo.LD)="Y"));
-
Just incase anyone wants to know, this is the resolution for this: $sql0 = "SELECT * FROM AllInfo WHERE Extension = '$ex' AND Date=#$id# ORDER BY Date DESC, Val(Left(Time,2)), Val(Right(Time,2))"; This will bunch together the am and pm times that are in the same hour but we only have data for 12 hours out of a day anyway, it's all right!
-
I have this query that sorts through an Access database and pulls out a list of all the calls that took place on a specific extension. The query works for pulling all the calls, then when it displays them on the page, they are not always in order. I would like to be able to simply click the column header and have the whole table resort itself based on the header like in Excel. If that's not possible, maybe just having everything sort by Date correctly would work fine. Any body want to take a stab at it for me? <html><head> <link href="style.css" rel="stylesheet" type="text/css"> <link href="Scripts/EnterSubmit.js" rel="javascript" type="text/javascript"> <script type="text/javascript" src="ddtabmenufiles/ddtabmenu.js"> /*********************************************** * DD Tab Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code ***********************************************/ //DD Tab Menu- Last updated April 27th, 07: http://www.dynamicdrive.com //Only 1 configuration variable below var ddtabmenu={ disabletablinks: false, ////Disable hyperlinks in 1st level tabs with sub contents (true or false)? currentpageurl: window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, ""), //get current page url (minus hostname, ie: http://www.dynamicdrive.com/) definemenu:function(tabid, dselected){ this[tabid+"-menuitems"]=null this.addEvent(window, function(){ddtabmenu.init(tabid, dselected)}, "load") }, showsubmenu:function(tabid, targetitem){ var menuitems=this[tabid+"-menuitems"] for (i=0; i<menuitems.length; i++){ menuitems[i].className="" if (typeof menuitems[i].hasSubContent!="undefined") document.getElementById(menuitems[i].getAttribute("rel")).style.display="none" } targetitem.className="current" if (typeof targetitem.hasSubContent!="undefined") document.getElementById(targetitem.getAttribute("rel")).style.display="block" }, isSelected:function(menuurl){ var menuurl=menuurl.replace("http://"+menuurl.hostname, "").replace(/^\//, "") return (ddtabmenu.currentpageurl==menuurl) }, addEvent:function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload) var tasktype=(window.addEventListener)? tasktype : "on"+tasktype if (target.addEventListener) target.addEventListener(tasktype, functionref, false) else if (target.attachEvent) target.attachEvent(tasktype, functionref) }, init:function(tabid, dselected){ var menuitems=document.getElementById(tabid).getElementsByTagName("a") this[tabid+"-menuitems"]=menuitems for (var x=0; x<menuitems.length; x++){ if (menuitems[x].getAttribute("rel")){ this[tabid+"-menuitems"][x].hasSubContent=true if (ddtabmenu.disabletablinks) menuitems[x].onclick=function(){return false} } else //for items without a submenu, add onMouseout effect menuitems[x].onmouseout=function(){this.className=""} menuitems[x].onmouseover=function(){ddtabmenu.showsubmenu(tabid, this)} if (dselected=="auto" && typeof setalready=="undefined" && this.isSelected(menuitems[x].href)){ ddtabmenu.showsubmenu(tabid, menuitems[x]) var setalready=true } else if (parseInt(dselected)==x) ddtabmenu.showsubmenu(tabid, menuitems[x]) } } } //SYNTAX: ddtabmenu.definemenu("tab_menu_id", integer OR "auto") ddtabmenu.definemenu("ddtabs1", 0) //initialize Tab Menu with ID "ddtabs1" and select 1st tab by default </script> <style type="text/css"> <!-- .style2 { font-size: 16px; font-style: italic; color: #00FF00; } --> </style> <body> <div id="ddtabs1" class="basictab"> <ul> <li><a href="DailyCallTotals_SelectDate.php" rel="sc2">Calls By Team</a></li> <li><a href="CallsByHour.php" rel="sc2">Calls By Hour</a></li> <li class="style2"><a href="AllCalls.php" rel="sc1">All Calls By Extension</a></li> </ul> </div> <h2>Show All Calls by Extension</h2> <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post"> <div align="left">Enter Date: <input type="text" name="id" value="<?php echo date("m/d/y");?>"> <br> Enter Ext: <input type="text" name="ex" value=""> <br> <input type="submit" name="submit" value="Submit" onKeyPress="return submitenter(this,event)"> </div> </form> <?php //require_once('odbc.php'); // //$query = odbc_exec($odbc, "SELECT Top 1 * FROM AllInfo WHERE IO = 'Out' AND CO = '54' ORDER BY [DateTime] DESC, [Extension] DESC") or die (odbc_errormsg()); //while($row = odbc_fetch_array($query)) //{ // echo 'Database current as of<strong> '.date("F j, Y, g:i a", strtotime($row['DateTime'])).'</strong> and will update every 23 minutes.'; //} //odbc_close($odbc); //?> <hr> <p><?php require_once('odbc.php'); // Transform minutes like "105" into hours like "1:45". function minutesToHours ($sec, $padHours = false) { // holds formatted string $hms = ""; // there are 3600 seconds in an hour, so if we // divide total seconds by 3600 and throw away // the remainder, we've got the number of hours $hours = intval(intval($sec) / 3600); // add to $hms, with a leading 0 if asked for $hms .= ($padHours) ? str_pad($hours, 2, "0", STR_PAD_LEFT). ':' : $hours. ':'; // dividing the total seconds by 60 will give us // the number of minutes, but we're interested in // minutes past the hour: to get that, we need to // divide by 60 again and keep the remainder $minutes = intval(($sec / 60) % 60); // then add to $hms (with a leading 0 if needed) $hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ':'; // seconds are simple - just divide the total // seconds by 60 and keep the remainder $seconds = intval($sec % 60); // add to $hms, again with a leading 0 if needed $hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT); // done! return $hms; } if(isset($_POST['submit'])) { $id = $_POST['id']; $ex = $_POST['ex']; if($id!="" & $ex!="") { echo "<b>Total number of calls for : ".$id."<br></b>"; $unixtime = time(); echo "" . date("F j, Y, g:i a",$unixtime) . "<br><br>"; $sql = "SELECT Count(*) AS TotalNumberOfCalls FROM AllInfo WHERE Extension = '$ex' AND Date=#".$id."#"; $time = "SELECT Date, Extension, sum(DurationS) AS CountOfDuration FROM AllInfo WHERE Extension = '$ex' AND Date=#$id# GROUP BY Date, Extension"; $sql0 = "SELECT * FROM AllInfo WHERE Extension = '$ex' AND Date=#$id#"; $sql = odbc_exec($odbc,$sql) or die(odbc_errormsg()); $timequery = odbc_exec($odbc,$time) or die(odbc_errormsg()); $sql0 = odbc_exec($odbc,$sql0) or die(odbc_errormsg()); echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"borderTable\"><tr><th class=\"borderTable\"> Extension </th><th class=\"borderTable\"> Time </th><th class=\"borderTable\">Total Dials</th><th class=\"borderTable\">Total Talk Time</th></tr>"; while($row = odbc_fetch_array($sql)) { echo "<tr>"; echo "<td class=\"borderTable\"><center>$ex</center></td class=\"borderTable\">"; echo "<td class=\"borderTable\"><center>00:01-23:59</center></td class=\"borderTable\">"; echo "<td class=\"borderTable\"><center>".$row['TotalNumberOfCalls']."</center></td class=\"borderTable\">"; while($row = odbc_fetch_array($timequery)){ echo "<td class=\"borderTable\"><center>".minutesToHours($row["CountOfDuration"])."</center></td class=\"borderTable\"></table><p></p>"; } } // end while echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"borderTable\"><tr><th class=\"borderTable\"> Extension </th><th class=\"borderTable\"> Time </th><th class=\"borderTable\">In/Out</th><th class=\"borderTable\">Phone Number</th><th class=\"borderTable\">Duration</th></tr>"; while($row = odbc_fetch_array($sql0)) { echo "<tr>"; echo '<td class=\"borderTable\"><center>'.$row['Extension'].'</center></td class=\"borderTable\">'; echo '<td><center>'.date("h:i", strtotime($row['DateTime'])).'</center></td>'; echo '<td class=\"borderTable\"><center>'.$row['IO'].'</center></td class=\"borderTable\">'; echo '<td class=\"borderTable\"><center>('.$row['AC'].') '; echo ''.$row['PhN'].'</center></td class=\"borderTable\">'; echo '<td class=\"borderTable\"><center>'.$row['Duration'].'</center></td class=\"borderTable\">'; } // end while } // end if } // end if ?> <?php odbc_close($odbc); ?> </p> <p> </p> </body></html>
-
Yeah!! You totally rock, that does it. Thank you sooooo much!
-
I know you're probably busy, but any ideas on this? I noticed the part of the query that totals the number of calls is not in there "TotalNumberOfCalls". I try to call it in the table just before the total talk time: echo "<td class=\"borderTable\"><center>".$row['TotalNumberOfCalls']."</center></td class=\"borderTable\">"; But it's missing from the query above. I did have a separate query for that, so I added it back in, but I'm still getting the same results. No matter what extension or date I query for, the table does not print, it just returns "37000". So here is what I have now: <body> <div id="ddtabs1" class="basictab"> <ul> <li><a href="DailyCallTotals_SelectDate.php" rel="sc2">Qualifiers</a></li> <li><a href="Sales_DailyCallTotals_SelectDate.php" rel="sc2">Sales</a></li> <li><a href="CallsByHour.php" rel="sc2">Calls By Hour</a></li> <li class="style2"><a href="AllCalls.php" rel="sc1">All Calls By Extension</a></li> </ul> </div> <h2>Show All Calls by Extension</h2> <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post"> <div align="left">Enter Date: <input type="text" name="id" value="07/22/08"> <br> Enter Ext: <input type="text" name="ex" value="3897"> <br> <input type="submit" name="submit" value="Submit" onKeyPress="return submitenter(this,event)"> </div> </form> <hr> <p><?php require_once('odbc.php'); function get_seconds($t){ $seconds = 0; if(is_array($t)){ foreach($t as $v){ $array = array(); $pt1 = array(); $pt2 = array(); $array = explode(':', $v); $pt1[] = $array[0]; $pt2 = explode("'", $array[1]); $time = array_merge($pt1, $pt2); $sec = $time[2]; $min = $time[1]*60; $hour = $time[0]*60*60; $seconds += ($sec+$min+$hour); } } else { $array = explode(':', $t); $pt1[] = $array[0]; $pt2 = explode("'", $array[1]); $time = array_merge($pt1, $pt2); $sec = $time[2]; $min = $time[1]*60; $hour = $time[0]*60*60; $seconds += ($sec+$min+$hour); } return $seconds; } if(isset($_POST['submit'])) { $id = $_POST['id']; $ex = $_POST['ex']; if($id!="" & $ex!="") { echo "<b>Total number of calls for : ".$id."<br></b>"; $unixtime = time(); echo "" . date("F j, Y, g:i a",$unixtime) . "<br><br>"; $sql2 = "SELECT Count(*) AS TotalNumberOfCalls2 FROM AllInfo WHERE Extension = '3884' AND Date=#".$id."#"; $query2 = odbc_exec($odbc,$sql2) or die(odbc_errormsg()); $time = array(); $sql = "SELECT Date, Extension, Duration FROM AllInfo WHERE Extension = '$ex' AND Date=#$id# GROUP BY Date, Extension"; $result = odbc_exec($odbc, $sql) or die(odbc_error()); echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"borderTable\"><tr><th class=\"borderTable\"> Extension </th><th class=\"borderTable\"> Time </th><th class=\"borderTable\">Total Dials</th><th class=\"borderTable\">Total Talk Time</th></tr>"; while($row = odbc_fetch_array($query2)) { echo "<tr>"; echo "<td class=\"borderTable\"><center>$ex</center></td class=\"borderTable\">"; echo "<td class=\"borderTable\"><center>00:01-23:59</center></td class=\"borderTable\">"; echo "<td class=\"borderTable\"><center>".$row['TotalNumberOfCalls']."</center></td class=\"borderTable\">"; } while($row = odbc_fetch_array($result)) { $cur_ext = $row['Extension']; $cur_date = $row['Date']; $t_sql = "SELECT Duration FROM AllInfo WHERE Extention = '$cur_ext' AND Date = '#$cur_date#'"; $t_res = odbc_exec($odbc, $t_sql) or die(odbc_error()); while($tr = odbc_fetch_array($t_res)){ $time[] = $tr['Duration']; } $seconds = get_seconds($time); echo "<td class=\"borderTable\"><center>".date("H:i:s", mktime(0, 0, $seconds))."</center></td class=\"borderTable\"></table><p></p>"; } // end while } // end if } // end if ?> <?php odbc_close($odbc); ?> </p> <p> </p> </body>
-
It returns this: I did change this line: $t_res = odbc_exec($odbc, $t_sql) or die(mysql_error()); To this: $t_res = odbc_exec($odbc, $t_sql) or die(odbc_error());
-
I left out my total dials query. I added it back in now, but it still doesn't return results. <?php require_once('odbc.php'); function get_seconds($t){ $seconds = 0; if(is_array($t)){ foreach($t as $v){ $array = array(); $pt1 = array(); $pt2 = array(); $array = explode(':', $v); $pt1[] = $array[0]; $pt2 = explode("'", $array[1]); $time = array_merge($pt1, $pt2); $sec = $time[2]; $min = $time[1]*60; $hour = $time[0]*60*60; $seconds += ($sec+$min+$hour); } } else { $array = explode(':', $t); $pt1[] = $array[0]; $pt2 = explode("'", $array[1]); $time = array_merge($pt1, $pt2); $sec = $time[2]; $min = $time[1]*60; $hour = $time[0]*60*60; $seconds += ($sec+$min+$hour); } return $seconds; } if(isset($_POST['submit'])) { $id = $_POST['id']; $ex = $_POST['ex']; if($id!="" & $ex!="") { echo "<b>Total number of calls for : ".$id."<br></b>"; $unixtime = time(); echo "" . date("F j, Y, g:i a",$unixtime) . "<br><br>"; $totalcalls = "SELECT Count(*) AS TotalNumberOfCalls FROM AllInfo WHERE Extension = '$ex' AND Date=#".$id."#"; $time = array(); $sql = "SELECT Date, Extension, Duration FROM AllInfo WHERE Extension = '$ex' AND Date=#$id# GROUP BY Date, Extension"; $totalcalls = odbc_exec($odbc,$totalcalls) or die(odbc_errormsg()); $result = odbc_exec($odbc, $sql) or die(odbc_error()); echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"borderTable\"><tr><th class=\"borderTable\"> Extension </th><th class=\"borderTable\"> Time </th><th class=\"borderTable\">Total Dials</th><th class=\"borderTable\">Total Talk Time</th></tr>"; while($row = odbc_fetch_array($totalcalls)) { echo "<tr>"; echo "<td class=\"borderTable\"><center>$ex</center></td class=\"borderTable\">"; echo "<td class=\"borderTable\"><center>00:01-23:59</center></td class=\"borderTable\">"; echo "<td class=\"borderTable\"><center>".$row['TotalNumberOfCalls']."</center></td class=\"borderTable\">"; while($r = odbc_fetch_array($result)){ $time[] = $r['Duration']; } $seconds = get_seconds($time); echo "<td class=\"borderTable\"><center>".date("H:i:s", mktime(0, 0, $seconds))."</center></td class=\"borderTable\"></table><p></p>"; } // end while } // end if } // end if ?>
-
I actually need total time per extension on the date inputed. It should end up looking like this: Extension Time Total Dials Total Talk Time 3897 00:01-23:59 39 0:51:45 The "Time" column is in there because I run the query over and over again to show 6-7, 7-8, etc. There is probably a better way to do that, but that's another post all together!!
-
I think I might have mixed something up in here because it's not returning anything. Here is my whole query, do you see what I did wrong? <p><?php require_once('odbc.php'); function get_seconds($t){ $seconds = 0; if(is_array($t)){ foreach($t as $v){ $array = array(); $pt1 = array(); $pt2 = array(); $array = explode(':', $v); $pt1[] = $array[0]; $pt2 = explode("'", $array[1]); $time = array_merge($pt1, $pt2); $sec = $time[2]; $min = $time[1]*60; $hour = $time[0]*60*60; $seconds += ($sec+$min+$hour); } } else { $array = explode(':', $t); $pt1[] = $array[0]; $pt2 = explode("'", $array[1]); $time = array_merge($pt1, $pt2); $sec = $time[2]; $min = $time[1]*60; $hour = $time[0]*60*60; $seconds += ($sec+$min+$hour); } return $seconds; } if(isset($_POST['submit'])) { $id = $_POST['id']; $ex = $_POST['ex']; if($id!="" & $ex!="") { echo "<b>Total number of calls for : ".$id."<br></b>"; $unixtime = time(); echo "" . date("F j, Y, g:i a",$unixtime) . "<br><br>"; $time = array(); $sql = "SELECT Date, Extension, Duration FROM AllInfo WHERE Extension = '$ex' AND Date=#$id# GROUP BY Date, Extension"; $result = odbc_exec($odbc, $sql) or die(odbc_error()); echo "<center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"borderTable\"><tr><th class=\"borderTable\"> Extension </th><th class=\"borderTable\"> Time </th><th class=\"borderTable\">Total Dials</th><th class=\"borderTable\">Total Talk Time</th></tr>"; while($row = odbc_fetch_array($sql)) { echo "<tr>"; echo "<td class=\"borderTable\"><center>$ex</center></td class=\"borderTable\">"; echo "<td class=\"borderTable\"><center>00:01-23:59</center></td class=\"borderTable\">"; echo "<td class=\"borderTable\"><center>".$row['TotalNumberOfCalls']."</center></td class=\"borderTable\">"; while($r = odbc_fetch_array($result)){ $time[] = $r['Duration']; } $seconds = get_seconds($time); echo "<td class=\"borderTable\"><center>".date("H:i:s", mktime(0, 0, $seconds))."</center></td class=\"borderTable\"></table><p></p>"; } // end while } // end if } // end if ?>
-
I think this is specific to MySql right, what do I put in here for accessing my Access database I am pulling info from? $result = odbc_exec($odbc,$sql) or die(odbc_errormsg()); while($r = odbc_exec($result)){[/quote]
-
If I just change the query to look at Duration instead of DurationS, then put the line you created with date and mktime, I get an error that says : "Data type mismatch in criteria expression." I don't think it likes the format of the Duration column. Trying to get an understanding of what I'm doing, I can summarize it like this. "Retrieve all calls on extension X for date Y and add all the call times together. The call times are located in the Duration column." But when it looks at the Duration column it errors out.
-
Hmm... mktime, interesting! I'm not sure I understand the way it works just by looking at it. I ran into that before, but reading the PHP manual on functions just makes me so lost sometimes that I didn't devote much time into trying to figure it out! I am actually a network admin who has to do some of this stuff, so I'm not really a programmer or designer of any sort. It returns the total time for all calls on the extension specified for the date requested. Duration contains HH:MM'SS Total number of seconds for the call, but it's not correct. It's telling me for a call that was 01:03'55 long, that the total number of seconds is 595. So I need to total the Duration column instead of the DurationS column. Yeah, I need to show the total amount of time that caller has been on the phone.
-
Okay, I'm an idiot. I can't seem to get this to do what I want it to. THE SCRIPT WORKS GREAT THOUGH, thank you. I need to integrate it into this query somehow and I can't seem to get it right. First I query for the data my user inputs (date and extension) then I use "sum" of DurationS which is a table in my database that totals the seconds of a call (but it's not working right so I have to calculate the total number of seconds based on the Duration column which is formatted as HH:MM'ss). $time = "SELECT Date, Extension, sum(DurationS) AS CountOfDuration FROM AllInfo WHERE Extension = '$ex' AND Date=#$id# GROUP BY Date, Extension"; Then I take my "CountOfDuration" and run it through my "minutestohours" function to get it to display everything in the right time format. echo "<td class=\"borderTable\"><center>".minutestohours($row["CountOfDuration"])."</center></td class=\"borderTable\"></table><p></p>"; } Here is the minutestohours function: // Transform minutes like "105" into hours like "1:45". function minutesToHours ($sec, $padHours = false) { // holds formatted string $hms = ""; // there are 3600 seconds in an hour, so if we // divide total seconds by 3600 and throw away // the remainder, we've got the number of hours $hours = intval(intval($sec) / 3600); // add to $hms, with a leading 0 if asked for $hms .= ($padHours) ? str_pad($hours, 2, "0", STR_PAD_LEFT). ':' : $hours. ':'; // dividing the total seconds by 60 will give us // the number of minutes, but we're interested in // minutes past the hour: to get that, we need to // divide by 60 again and keep the remainder $minutes = intval(($sec / 60) % 60); // then add to $hms (with a leading 0 if needed) $hms .= str_pad($minutes, 2, "0", STR_PAD_LEFT). ':'; // seconds are simple - just divide the total // seconds by 60 and keep the remainder $seconds = intval($sec % 60); // add to $hms, again with a leading 0 if needed $hms .= str_pad($seconds, 2, "0", STR_PAD_LEFT); // done! return $hms; } But I need to figure out how to get my query to run against the Duration column instead of the DurationS column or replace the DurationS with the results from the script you just gave me, but I need that script to total the Duration column and return that instead of a static HH:MM'SS. Does that make sense?
-
I have no idea what you just said!! ??? I just checked the Access database I am pulling the info from, and the Duration of each call is actually set up as HH:MM'SS it doesn't use the colon between MM and SS, so I think this might make it harder, but I have no idea. I guess I should have started this post with (NEW-B)!
-
I know there are a million posts out there about converting the other way, I need to know how to convert my Hours:Minutes:Seconds into just seconds so I can use a function I already have in place to calculate totals. Any ideas would be great, a completed script would be BEST!!
-
[SOLVED] php_ldap.dll on IIS (Windows Server 2003)
wellscam replied to wellscam's topic in PHP Coding Help
Here is the fix. The PHP manual says: It says nothing about 5.X which is what I am using so I didn't do this, but I HAD to do this to get it working!! I did not have the libsasl.dll as shown on 4.2.0, but I had the libeay32.dll and the ssleay32.dll and I copied those to system32 and restarted the IIS service, not the server itself and everything is just fine now!! -
[SOLVED] php_ldap.dll on IIS (Windows Server 2003)
wellscam replied to wellscam's topic in PHP Coding Help
Anyone else? I would like to get an application integrated with LDAP, but I can't seem to get the extension loaded correctly! -
[SOLVED] php_ldap.dll on IIS (Windows Server 2003)
wellscam replied to wellscam's topic in PHP Coding Help
User connent on there said exactly what I thought. Using windows, I don't need to compile LDAP services, it should just run. -
I am trying to get the ldap extension loaded on my server. I have uncommented the extension in the php.ini file. I have made sure there are no other php.ini files floating around and that the extension is in the correct directory. I have also then restarted the IIS Service and it still will not load. I can uncoment out other extensions and they load fine, but the ldap just will not work...any ideas? PHP Version 5.2.4 System Windows NT SERVERNAME 5.2 build 3790 Build Date Aug 30 2007 07:05:48 Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared" Server API ISAPI Virtual Directory Support enabled Configuration File (php.ini) Path C:\WINDOWS Loaded Configuration File C:\WINDOWS\php.ini
-
[SOLVED] Select Top 1* returns multiple results!
wellscam replied to wellscam's topic in PHP Coding Help
That seems to have done it Barand thank you so much for your patience and help on this! -
[SOLVED] Select Top 1* returns multiple results!
wellscam replied to wellscam's topic in PHP Coding Help
Yeah, I guess that syntax helps!! It's actually returning the first record in the database now though instead of the last! May 1, 2008, 5:27 am instead of July 2, 2008, 3:25 pm -
[SOLVED] Select Top 1* returns multiple results!
wellscam replied to wellscam's topic in PHP Coding Help
When I try this, $query = odbc_exec($odbc, "SELECT Top 1 * FROM AllInfo WHERE IO = 'Out' AND CO = '51' ORDER BY [DateTime, Extension] DESC") or die (odbc_errormsg()); I get this error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. I understand that there shouldn't be identical rows. Unfortunately, the database is being generated by a software program that I have no control over and it does not add a unique id for each row. It's a phone program that queries and logs our switch data into an Access database with simple data like Extension, Time, Date, Line Used, Incoming/Outgoing, Total Duration etc... My result sometimes repeats a couple of times and I'm thinking that it's because there are multiple calls with the same timestamp, is there another reason my query would produce the result twice? -
[SOLVED] Select Top 1* returns multiple results!
wellscam replied to wellscam's topic in PHP Coding Help
Is there an Access version of the Limit function, or is there a way to add multiple Order By criteria so I can choose more than one column to sort by?