Forum: PHP
Aug 5th, 2008, 6:21 AM
|
|
Replies: 0
Views: 235
|
Forum: PHP
Dec 19th, 2007, 4:40 AM
|
|
Replies: 7
Views: 283
Re: Opposite of global in functions
In fact when I checked your code there's no need now for the $howlong paramater passing to the function... so here's my new code..
Thanks again...
function CheckDateOld($date)
{
$reportdat =...
|
Forum: Coder's Corner Lounge
Dec 19th, 2007, 3:31 AM
|
|
Replies: 13
Views: 470
Re: Anyone played portal yet?
OBLIVION!!!! the only man for the job..
Oh and to get back on topic I have to say Portal was definitely one of the best games I've played in the last few years... shockingly addictive if only it...
|
Forum: PHP
Dec 12th, 2007, 5:19 PM
|
|
Replies: 2
Views: 196
|
Forum: PHP
Dec 12th, 2007, 7:05 AM
|
|
Replies: 2
Views: 196
Removing double spaces with str_replace
I want to replace double spaces with single spaces.
I have been able to do this before :
$new_string=str_replace(" "," ",$old_string)
this worked or I thought it did anyway with other strings...
|
Forum: PHP
Dec 12th, 2007, 6:51 AM
|
|
Replies: 7
Views: 283
|
Forum: PHP
Dec 7th, 2007, 3:07 AM
|
|
Replies: 7
Views: 283
Re: Opposite of global in functions
Although I have just tried what you said and it doesn't seem to work.
here's my code
$daysold="";
if (CheckDateOld($datestamp,60)){$reportdatefont=$redfont;}
echo "days...
|
Forum: PHP
Dec 7th, 2007, 2:58 AM
|
|
Replies: 7
Views: 283
|
Forum: Other Programming Languages
Dec 6th, 2007, 10:04 AM
|
|
Replies: 2
Views: 527
|
Forum: PHP
Dec 6th, 2007, 6:11 AM
|
|
Replies: 7
Views: 283
Opposite of global in functions
Hi all,,
Another stupid question from me...
I know that in order to use a variable from your main php within a function you need to use
global $variable
but I was wondering how you can set a...
|
Forum: PHP
Dec 6th, 2007, 5:48 AM
|
|
Replies: 12
Views: 520
|
Forum: Other Programming Languages
Dec 5th, 2007, 5:29 AM
|
|
Replies: 2
Views: 527
Command line screen capture
Anyone know of any useful apps to capture screen to compressed JPG (compression can be set)
I have tried this code in Autoit:
; Capture full screen
; Fist parameter - filename, last - jpeg...
|
Forum: PHP
Dec 4th, 2007, 5:38 PM
|
|
Replies: 12
Views: 520
Re: Select Non distinct in MySQL
Thanks. I knew there was a simpler way. I've seen this before but I keep forgetting the most used code I have and just copy and paste. yep stupid I know but that's me.. I'm gonna print out a list of...
|
Forum: PHP
Dec 4th, 2007, 10:06 AM
|
|
Replies: 12
Views: 520
Re: Select Non distinct in MySQL
Well I have this code working great now except for one thing... I can't get a number of how many results coming back from the DB and store it to a variable. see my variable $total_results... what am...
|
Forum: PHP
Dec 4th, 2007, 3:53 AM
|
|
Replies: 12
Views: 520
Re: Select Non distinct in MySQL
Ok so my original code looked right except I wanted everything so this is what worked for me:
SELECT *, COUNT(*) as count FROM aidahardware GROUP BY primarymac HAVING count > 1
|
Forum: PHP
Dec 4th, 2007, 3:49 AM
|
|
Replies: 12
Views: 520
|
Forum: PHP
Dec 3rd, 2007, 9:14 AM
|
|
Replies: 12
Views: 520
Re: Select Non distinct in MySQL
I tell a lie, I've just found what I think I'm looking for :
SELECT primarymac, COUNT(*) as count
FROM aidahardware
GROUP BY primarymac
HAVING count > 1
|
Forum: PHP
Dec 3rd, 2007, 9:12 AM
|
|
Replies: 12
Views: 520
Select Non distinct in MySQL
Hi all,
I know this isn't exactly PHP but I was wondering if there's a simple MySQL query you can use to get back non-distinct lines... like for example you can use SELECT DISTINCT to only give you...
|
Forum: PHP
Nov 21st, 2007, 4:42 AM
|
|
Replies: 8
Views: 340
Re: Simple "foreach" problem
Thanks dawei for your code it really helped me through a tight spot... I modified it a bit to suit my needs and here is the final code. I can't believe I never thought of using arrays like that.... I...
|
Forum: PHP
Nov 20th, 2007, 9:33 AM
|
|
Replies: 8
Views: 340
|
Forum: PHP
Nov 20th, 2007, 9:26 AM
|
|
Replies: 8
Views: 340
Re: Simple "foreach" problem
My apologies... I really have done a bad job of explaining it....
from the top, I have info coming in via the URL data - 'PATH_INFO' - that's info about the current state of a PC for example.. I...
|
Forum: PHP
Nov 20th, 2007, 8:46 AM
|
|
Replies: 8
Views: 340
Re: Simple "foreach" problem
parse error, unexpected '$' in W:\www\it2\aida\newinfo.php on line 47
but then I could have told you that just by looking at the code above that it wasn't right. I was just trying to get across what...
|
Forum: PHP
Nov 20th, 2007, 8:06 AM
|
|
Replies: 6
Views: 379
|
Forum: PHP
Nov 20th, 2007, 8:04 AM
|
|
Replies: 8
Views: 340
Simple "foreach" problem
Ok so I'm getting into PHP and I have a decent sized MySQL/PHP database system working fine but I'm having problems with the foreach command...
When I get the info from a MySQL database I usually...
|
Forum: PHP
Nov 20th, 2007, 6:58 AM
|
|
Replies: 6
Views: 379
|
Forum: PHP
Nov 12th, 2007, 12:15 PM
|
|
Replies: 6
Views: 379
|
Forum: PHP
Nov 12th, 2007, 10:09 AM
|
|
Replies: 6
Views: 379
|
Forum: PHP
Nov 12th, 2007, 8:48 AM
|
|
Replies: 6
Views: 379
|