ManiacDan
Staff Alumni-
Posts
2,604 -
Joined
-
Last visited
-
Days Won
10
Everything posted by ManiacDan
-
Rotating Banner Stop Rotating When I Remove A Link.
ManiacDan replied to Beeeeney's topic in Javascript Help
The source of the problem is most likely javascript. You can see the javascript in your browser by enabling firebug or developer tools, or you could just go find it in the filesystem since you have FTP access. -
How Do I Change P Class Based On A Condition?
ManiacDan replied to wright67uk's topic in PHP Coding Help
"Short tags" are deprecated and shouldn't be used, they'll be out of the language entirely soon. -
$file_name = $attachments[$x]; That line implies $attachments[$x] is a string $attachments[$x]['is_file'] = TRUE; In that line, you use $attachments[$x] as an array. Which is it?
-
Rotating Banner Stop Rotating When I Remove A Link.
ManiacDan replied to Beeeeney's topic in Javascript Help
I didn't say it's definitely a JS problem, all I know is that you pasted me 6 completely random lines of code that don't do anything to banners or rotation. -
I've moved you to the "website critiques" section. Do you not have this project running anywhere? Very few people will open and run an anonymous zip file full of code. What parts are they saying isn't very good? Maybe post a representative sample in the thread here
-
Rotating Banner Stop Rotating When I Remove A Link.
ManiacDan replied to Beeeeney's topic in Javascript Help
There is nothing in here that would rotate a banner. It's probably a javascript function. -
I don't know/care. I just wanted to make you grit your teeth for a second ;-)
-
My query: ON DUPLICATE KEY UPDATE `voted` = `voted` + VALUES(`voted`), `total` = `total` + VALUES(`total`); Your query: ON DUPLICATE KEY UPDATE `voted` = $addedtogether + VALUES(`voted`), `total` = 30 + VALUES(`total`)"; You swapped things. I had `total` and you have 30. I had `voted` and you had $addedtogether.
-
Give him a fishing pole Jess, come on.
-
Look at my query again. You swapped things.
-
$a = '2012-12-13 01:01:00'; echo date('jS F Y', strtotime($a)); See you on the other sites.
-
What a weird system. So you want: INSERT INTO `survey` (`username`, `voted`, `total`) VALUES ('maniacdan', '5', '10') ON DUPLICATE KEY UPDATE `voted` = `voted` + VALUES(`voted`), `total` = `total` + VALUES(`total`); Your original problem definition was missing a question ID.
-
Most of us belong to the other forums too. Speaking of the world inventing teachers, I asked you a question: what was confusing? If you want us to do more than show you the page with the exact answer you want, explain why you couldn't find the answer even when given the manual entry.
-
Wait, you want to ADD them? So if I rate something 5 out of 10. Then I come back and rate it 4 out of 10. You want the final score to be 9 out of 10?
-
You really honestly spent three hours reading the date() manual page? There's examples and everything. What part was confusing? You were given a fishing rod and a book on fishing and pointed toward the nearest body of water. We didn't point you to google, we pointed you to the document on how to do what you asked. The manual. Read it. Get the t-shirt
-
You want the word "December"? 1) Open up the page 2) Ctrl+F 3) Type "December" 4) Find this row: F A full textual representation of a month, such as January or March January through December 5) Use it inside the first argument to date: date('F'); 6) ??? 7) Get spoon fed the answer
-
You're missing the enormous purple table that's 3 pages long in the link you were provided.
-
My "suggestion" was a copy and paste of working code being executed by the PHP interpreter. What did you try?
-
Then stop helping him so he can go somewhere else. I don't understand the people who say: while simultaneously ignoring everything we say. This code is a random slapping together of disparate elements with no consistent style, random indentation, invalid SQL syntax, strings that exist for no reason as bare non-operations, poor concatenation, no security, and will never improve from us simply repeating good advice over and over. Stop what you're doing. Start this section of code over. Turn on error reporting. Handle your SQL errors. In fact, do this: $result = mysql_query( $sql ); if ( $result === false ) { die("Fatal SQL error for: {$sql}<P />MySQL Server returned: <br />" . mysql_error()); } If you use mysql_query anywhere else but in that exact block we can't help you. Copy and paste that. Copy and paste this as well: error_reporting(E_ALL); Error_reporting should be the very first line in your script.
-
The bug in reply #10 was a missing comma. I got too annoyed reading the thread to see if I'm the first person to spot it. Edit: Holy crap turn on error_reporting. Reply #31 would throw at least 6 PHP errors.
-
Valid the same way the while/endwhile is valid. It's still not the "right" way to do things. It's like we work in Perl sometimes.
-
Much better!
-
Did you really just use an MSDN link to justify yourself?
-
How do you expect the database to know what a duplicate is? You need to create a UNIQUE index on the table so the database can actually define the word "duplicate" Also, oauth UUIDs are usually alphanumeric, you don't quote yours. You also have your quotes wrong, inside "quotes variables are {$likeThis}, not ${likeThat}"
-
List Cities And How Many Records Match That City.
ManiacDan replied to derekshull's topic in PHP Coding Help
Remember when someone asked you... You've also added count(state) which is unnecessary, get rid of it. Your new query: $query = mysql_query("SELECT state, city, count(city) as num FROM needs WHERE status='posted' GROUP BY state, city ORDER BY state, city");