Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
I'm going to go ahead and assume this is in a database since you never specified. You can use the aggregate AVG() function to extrapolate the desired results.
-
[SOLVED] Vexing T_Variable is driving me nutz - help!
Maq replied to Chezshire's topic in PHP Coding Help
I agree. Nothing there should cause an error, even with error_reporting set to max. There are like 5 other lines that need to be changed from single to double quotes. -
[SOLVED] Vexing T_Variable is driving me nutz - help!
Maq replied to Chezshire's topic in PHP Coding Help
He's saying if $other is NOT empty it will concatenate $msg with 'ISSUE, COMMENT OR CONCERN: $other \n \n'; (literally the characters $other). You need to change the single quotes around that condition to double quotes. If you test out both ways you will see the difference. -
Why...? I don't know. But it's used for suppressing error messages.
-
I don't know, that's why I said, "Assuming 'post' is number of total posts.". Same reason you assumed otherwise. Because the OP didn't specify, it doesn't matter anyway, you can still extrapolate the info with a single query. I'm not. Do you not understand the code I provided? You're the one pulling extra information out when you only need MySQL to select 1 username. Not only that you're putting all of them in an array and performing multiple methods on it. Very inefficient... Wrong.
-
This works: $playedat[0] = 1245185052; echo date("H:i a", $playedat[0]); ?>
-
Sorry... what?
-
Your syntax is off. Missing a comma, no colon, and extra quotes. echo date("H:i a", $playedat[0]); ?>
-
YW, please mark solved.
-
Is there any terminating code in "cal_parms.php"? Maybe there is an error in that file, try turning on error_reporting in these files.
-
OK, 'to' is a reserved word - Reserved Words. The way around this is to use back ticks which will escape the reserved word and give the meaning literally. This should work: $getmail="SELECT * from PM where `to`='{$_SESSION['username']}'";
-
Change that line to: $getmail2=mysql_query($getmail) or die(mysql_error());
-
Change that to: $getmail="SELECT * from PM where to='{$_SESSION['username']}'"; It thought that the single quote in the query was ending the comparative value, when adding curly brackets it escapes the quotes and allows for variables such as arrays.
-
That's the most inefficient way to solve this problem. Why have MySQL return ALL the records when you only need 1... What if there's 80,000 users, are you going to put them in an array?
-
Sorry, you have to reverse the order of the clauses, my fault. Also, if you only want 1 username returned, you have to specify that with the LIMIT clause. $query = mysql_query("SELECT * from programme WHERE expiry > (curdate(), INTERVAL 1 WEEK) ORDER BY expiry DESC LIMIT 1") or die(mysql_error());
-
That's the third time your query has changed... The reason is because you don't need that comma there, that's it.
-
SELECT * from table ORDER BY date DESC WHERE date > DATE_SUB(curdate(), INTERVAL 1 WEEK); Depending on the order you want, the dates in you can use DESC (descending) or take it out which will, by default, make it ascending.
-
Hate to burst your bubble princess, but I don't think anyone is going to write a tutorial just for you. I'm sure you can find basic tutorials on how to create a login script. This is a very common request. I would recommend doing a search on phpfreaks for some similar threads as well. Just ignore the extra features you don't want.
-
Assuming 'post' is number of total posts. SELECT username from table ORDERY BY `post` DESC LIMIT 1
-
Thanks for the comments corbin. They both have 4ms response time. I agree. I'm sure they will both be loud enough for what I'm using it for. If I was going to pay for sound and media I would just buy a little media center with some speakers. Me either, I'm not into the lip. I'm not really concerned with looks as much as price vs quality, but the 1.8" thickness of the LG is nice. Good point, but Toshiba has been around for a while. Not sure that means anything as I have not heard much about Toshiba TV's, well, Toshiba in general. I'm still stuck... I think I am going to look around a little longer but I'm thinking I can land a decent deal for Father's Day, I want to pull the trigger soon.
-
Can't believe that calf survived, it was getting stretched and picked apart for like 5 minutes...
-
This is going to be a family room TV. Used for watching a lot of digital cable, video games (which is why I want the higher refresh rate), and some movies.
-
Yeah I have checked it and there is an option for enable/disable login to rate but I want to disable the login to rate and let the guests to rate and also not count their vote If they don't have to login to vote then how are you supposed to distinguish from guest and user? I guess you could prompt them to choose between user or guest, and if they choose user prompt them again for their username/password when they vote.
-
So I'm moving soon and wanted to buy a nice TV for my new place. The specs I'm looking for: 42" - 46" LCD >=120Hz I'm trying to spend less than $1,000 but am willing to spend the extra money for a bigger screensize and/or higher quality. Some of my considerations so far: Philips 42" 120Hz ($879) http://accessories.us.dell.com/sna/products/Televisions/productdetail.aspx?&sku=A2501425&s=dhs LG 42" 1080p 120hz LCD HDTV w/ Super Slim 1.8" - 42LGX ($999.99 Free Shipping) http://www.newegg.com/Product/Product.aspx?nm_mc=AFC-SlickDeals&cm_mmc=AFC-SlickDeals-_-NA-_-NA-_-NA&Item=N82E16889005050 Sharp LC46E77U 46-Inch 1080p 120Hz LCD HDTV, Black ($1,169.89) http://www.amazon.com/exec/obidos/tg/detail/-/B001RCTA38/ref=pd_luc_mri?_encoding=UTF8&m=ATVPDKIKX0DER&v=glance Toshiba REGZA Cinema Series 46XV545U 46-Inch 1080p 120Hz LCD HDTV ($1,099.97) http://www.amazon.com/Toshiba-REGZA-Cinema-46XV545U-46-Inch/dp/B001EDXPO0/ref=pd_lpo_k2_dp_k2a_2_txt?pf_rd_p=304485601&pf_rd_s=lpo-top-stripe-2&pf_rd_t=201&pf_rd_i=B00140U136&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=1AP4DS9GZMNNEGQ0R786 I'm really not sure of the quality for each brand and all the reviews are so mixed. Suggestions or comments?
-
[SOLVED] Two Submit Buttons, undefined variable problem
Maq replied to dhorn's topic in PHP Coding Help
Please, elaborate. It will make it much easier for us to diagnose the problem if we know what happens, doesn't happen, and if there are any errors.