-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
take the i off.
-
I'm sure you've changed your code so much now that I don't even know if you've got mysql with a mysqli connection post all your code again..what you have so far
-
the ShamWow dude got arrested for beating up a hooker EDIT: the link http://www.ebaumsworld.com/pictures/view/80592113/
-
It means that you are trying to connect to your database WITHOUT a proper connection variable...... $result = mysqli_query($cxn,$sql) quickest solution: Switch the parameters! also...you don't need mysqli and you can't call mysql_error() on mysqli connections...if I'm not mistaken....seems pretty logical too using mysqli you'd have to connect like this $cxn = new mysqli("localhost", "my_user", "my_password", "world");
-
YYYY-DD-MM, eh its seems as though you are formatting it as YYYY-MM-DD does this clear things up
-
Yeah, and what exactly does that mean for you? How is it compared to ISAPI? What can you now (not) do that you are in FastCGI? I probably sound like I'm going crazy here, but I simply don't understand it all. It's just like the "unlimited bandwidth" concept to me. We now offer our PHP Server with FastCGI!!! Woo....!!! Like the word "Fast" is just good enough of an explanation for the average user. What is so Fast about it. And as far as I know, a CGI script is the same as a PHP script. Just two different server-side languages. I'm sure if I were a lot more well versed in Linux I could understand this all sooo much better, but I'm not. I'm a Windows junkie, stuck in the checkbox utopia of "ISAPI or FastCGI" I'm not just asking this for myself, I'm trying to gather up enough knowledge on this subject that everyone can understand. If you are a true web developer then you know ALL the tools and when to use them. I have two tools whose reasons I don't even know about. I think I've confused myself more by writing about all this than I was before the thought came to mind. EDIT: I believe my only answer is going to come from me installing a barebones Apache server...and doing the building block process
-
It's not so much..that I'm looking for an answer. I'm looking for clarification. Without having to run 100s of stability tests and memory benchmarks and what not, (Actually, where are these statistics if any.) I would like to be able to briefly paraphrase to someone in "dummy" terms what each one actual is. Instead I have to regurgitate something I've googled even though I KNOW I have experience with it...I don't know the differences that are there....rather than installation procedure. A Google Definition ISAPI FastCGI CGI I guess you are right...I just check my phpinfo() and my current Gateway Interface is CGI/1.1 I can only assume that means I'm using FastCGI. but on the other hand -> http://httpd.apache.org/docs/1.3/mod/mod_isapi.html Yeah sometimes I ask sometimes stupid questions and worry about things I probably shouldn't care about. But often times I'm having to explain something I'm used to when someone confronts me with, "Why." So why ISAPI rather than FastCGI? In which I'd answer....just because. That's a worthless answer.
-
Well, now you're at 1001 and life goes on....lol We still have the super posters like Barand and thorpe here to show us up.
-
Honestly, what it the difference in the two? Sure, one is faster than the other, but what is the true difference. What can one possibly benefit from using FastCGI over ISAPI or vice versa. I can't google a single decent reading on this question. I've used ISAPI ever since I started messing with PHP. Yet, I still have the grass is always greener syndrome. What am I missing? Without any jargon. I'm sure other people are wanting to know this too. I found this page at the best http://forums.iis.net/t/1146597.aspx Does anyone have any insight on the FastCGI procedure. Hell, I can install PHP, MySQL, and Apache streamlined...but I always do it with ISAPI. Either way, I'm just following a conditioned routine. If I get an Apache error...I pretty much just google it and find my answer. I don't get paid to develop servers. Also, I'm asking this question from the perspective of someone who hasn't compiled PHP before. I see people talk about it all the time. Compile it with safe-mode, compile it without get-magic-quotes, etc, etc. I think I'm going a little off topic now. But honestly, what makes one module better than the other. Why is there TWO? And please don't tell me that there isn't a difference and that it's pure preference....they have two for a reason and the reason is soo hidden under jargon that I give up on understanding.
-
Yeah...I just reached 2000 a day or so ago... and I've been here 5 years..
-
oh yeah...probably shouldn't have taken the $i's out of there else if(date('F', strtotime("+{$i} month")) != date('F')) echo date('F', strtotime("+{$i} month")); No clue why it wouldn't start on the current month? What month does is start on then EDIT: This works flawlessly for me....tested $i = 0; while($i if($i == 0) echo "" . date('F') . "\n"; else if(date('F', strtotime("+{$i} month")) != date('F')) echo "" . date('F', strtotime("+{$i} month")) . "\n"; $i++; } ?>
-
$i = 0; while($i if($i == 0) echo date('F'); else if(date('F', strtotime("+1 month")) != date('F')) echo date('F', strtotime("+1 month")); $i++; } Quick and Dirty way to just output it to text....one can easily create and array from this NOTE: I have not tested this...no guarentees...but the idea should work
-
DEFINE....not working
-
because if ($_POST['p']) isn't ever true. it should be if (isset($_POST['p']) && !empty($_POST['p'])) but actually you should call that FIRST if (isset($_POST['p']) && !empty($_POST['p'])){ $p=$_POST['p']; $p=str_replace("“", "\"", $p); $p=str_replace("”", "\"", $p); $p=str_replace("’", "'", $p); $p=str_replace("‘", "'", $p); $p=str_replace("–", "-", $p); $p=str_replace("•", "-", $p); }?>
-
damn...I learn something everyday...my bad
-
SELECT TeamLeader, AgentName, EmpID, AvayaID, date, SUM(StaffedTime), AHT , ACDCalls, SUM(ACDTime) , AvgACDTime, SUM(ACWTime), SUM(AvgACWTime), HoldCalls, HoldTime, AvgHoldTime, OutboundCalls , SUM(OutboundTime) , SUM(), RingTime, AvgRingTime, AVG(utilization), SUM(aux1), SUM(aux2), SUM(aux7), SUM(aux8), SUM(aux9) FROM import_stats WHERE EmpID = '$searchreq' || AgentName = '$searchreq' GROUP BY AgentName All this is doing is getting a sum for each column..and a few averages here and there if you want to go by what you are talking about then you'll need to SUM (add) ALL of those together like SELECT (SUM(ACDTime, ACWTime, OutboundTime, AvailTime, aux1, aux2, aux7, aux8, aux9) / StaffedTime) as efficiencyFormula Also, this will do nothing $row2['SUM(ACDTime)']; you can't call SQL in an array...that's PHP you'll have to call $row['efficiencyFormula']; and multiply by 100 to make it a percentage
-
Actuall you should shorten that function to 2 lines function connect($dbServer, $user, $pass, $dbName) { $c = mysql_connect($dbServer, $user, $pass) or die(mysql_error()); mysql_select_db($dbName); } mysql_select_db("niccaman_agents",$con); You only need to provide the connection link if you are using more than one MySQL server...so nix that second argument next time you go about that
-
function connect() { // ** Connect to Database ** $con = (mysql_connect("localhost", "niccaman_bond", "007")); if (!$con) { die('Could not connect: ' . mysql_error()); } // ** Select MySQL table "agents" ** mysql_select_db("niccaman_agents",$con); } There is nothing wrong with the above code...it is actually the most generic of scripts there are. Like you mentioned earlier...you forgot text/javascript it most definitely is an external problem....show your full code..with code tags...
-
Here's a good tutorial on securing your SQL queries http://forum.codecall.net/security-tutorials/4422-php-sql-injections.html
-
Suggestion: Project Announcement Forum?
Zane replied to wilco's topic in PHPFreaks.com Website Feedback
you can always put it in your sig -
Suggestion: Project Announcement Forum?
Zane replied to wilco's topic in PHPFreaks.com Website Feedback
Beta Testing Forum http://www.phpfreaks.com/forums/index.php/board,62.0.html -
going out on a limb here but maybe SELECT SUM(hours) as Hours FROM `projects_tbl` GROUP BY project