-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
SELECT * FROM TESTDB WHERE NOT EXISTS (( SELECT DISTINCT song FROM TESTDB WHERE weeknum ) as songCheck) might work?
-
Not tested but perhaps this might work... Again, try it in the console first SELECT `id` FROM `soundoff_hof` WHERE `id` NOT IN (SELECT TOP 15 score FROM `soundoff_hof`)
-
I'm still lost at what your question is. Is there something wrong with your code? Are you looking for design techniques? What is your logic... in a verbose sense.? I have a sneaking suspision that you need to research this function array_merge()
-
no... that's not what I meant By doing that you just removed the functions flat out.. which would leave your script doing nothing whatsoever. This is what I meant $conn = @mysql_connect("mysql4.000webhost.com") or die("Try Again Punk"); Also... you can actually find the exact reason something doesn't work if you use the mysql_error function $conn = @mysql_connect("mysql4.000webhost.com") or die("This is your error: -> " . mysql_error());
-
Have you tried running it as a SELECT statement first... just to see if it's actually finding something to delete. SELECT `id` FROM `soundoff_hof` WHERE `id` NOT IN (SELECT `id` FROM `soundoff_hof` ORDER BY `score` DESC LIMIT 15) FYI It's usually best to do these kinds of checks from the mysql console btw.... or phpmyadmin. rather than a php script.
-
define "work correctly". You might find out most of your problems if you take out the error supressors. (The @ symbols) so you can find out why it's not working. In fact, you will
-
Unless you use Javascript (your best bet) you'll have to use ONE FORM and make it span the entire body of your document...just to be safe. </pre> <form> //Form One //Form Two </form> <b This way you can put as many submit buttons as you possibly need.. Then on your receiving page.. just check for which submit button they clicked.. since the other submit buttons will not be sent through... Though any fields that were filled in will still be sent. It will give the illusion you are using multiple forms.
-
I believe that double quote at the end should be outside the parentheses $removeold = $db->execute("DELETE FR.........N (SELECT.........T 15");
-
Just throwing it out there but couldn't you use GROUP BY calldate... rather than selecting distinct
-
'group'=Kanes Dwarfs'" should be `group`='Kanes Dwarfs'" Notice the difference in 'group' and `group`. This is required since group is a reserved MySQL word. Otherwise you could just have group by itself without any quotes and also.. Kanes Dwarfs needs to be surrounded with the regular quotes..
-
I've never edited this setting but I'd imagine it's as easy as this max_upload_filesize = 10M Although you may have to restart Apache directly afterwards
-
And ironically on the contrary .... dropping a hard drive can sometimes fix them as I've found out from experience... knocking the heads back into place. [ot]Much like the same concept I had with the last 2 seizures I had. The first one dislocated my shoulder leaving it immobile for a 2 months until I had the next seizure which "fixed" it[/ot]
-
Hmm.. Don't know why I was under the impression SATAs didn't spin. But regardless, since they both spin now....consider what I said to begin with in the IDE paragraph. Lesson of the day: Solid State Discs FTW!
-
Which kind of HDD was it? IDE or SATA. I ask because IDE have an RPM (rotations per minute) rate. And the typical RPM for an IDE HDD is 7,200. So you could just imagine the liabilities involved there. Just bumping your laptop the wrong way could essentially "break" something. Seeing as how that's really GD fast, I'd say that spinning disc has enough momentum to break anything. Even it is wasn't 7200 RPM it would have been at least 5400.. which is still, beyond human abilities. So that would be your answer assuming your HDD was IDE. If it was SATA then perhaps some dust got in there or the drive was faulty to begin with. I can't exactly pull an explanation for something breaking in an SATA drive out of my ass. That's pretty odd. Those are solid state drives. Much like a USB Flash drive. So just imagine ways in which a flash drive could tear up and that's probably what happened to your SATA Hard drive (assuming it was SATA)
-
No doubt! That is by far my favorite episode.. I've never laughed so hard. There's also an episode with Robin Williams. Which might as well be called "The ALL ABOUT ROBIN WILLIAMS episode" He really is annoying in improve.... pretty funny though. The one with Stephen Colbert made me laugh quite a bit. It was made back when he was on the Jon Stewart show. Another great gem on that show is the episode where they have the Sound Effects game using two old ladies from the audience. They were so horrible at improv that you couldn't stop laughing at their attempted sound effects and they ways Colin and Ryan reacted to them will make you drop to your knees laughing
-
You should be able to do this with fseek. Fseek moves the file pointer to a certain location. You can get the middle of the file's location using filesize along with the above function... and divide it by 2. Use fwrite for writing to the file. And use fopen to open the file to begin with. example $theFile = fopen("myFile.txt", 'w'); fseek($theFile, (filesize($theFile)/2)); fwrite($theFile, "The middle of the file");
-
Well.. now I've done it. I saw a suggestion somewhere out there that said perhaps if I restarted the problem would go away. I figured that may just be it since I hadn't restarted in quite awhile...since before I restarted to find the squares. So I restarted and now it refuses to load up the GUI. When the Ubuntu loading screen comes up.. it says on the "list of stuff" that the "loading kernel variables" failed. It then.. after displaying more stuff.. goes to the CLI.. I try to run startx but nothing happens.. just more errors. I really did it this time. How am I online now? I'm using the Ubuntu Live CD. Still, does anyone have a clue what may have happened. I'm still able to get into the CLI to run commands and such, but I'm lost as far as what to do now. I've pretty much given up... I'll stick with the Live CD unless someone has a suggestion
-
[ot]I'm working on my buddies computer.. Came to the conclusion that I wouldn't be able to install my burnt version(s) of Windows onto it until they buy a DVD Drive... seeing as how my mediums are DVD-Rs So I got bored and decided to install Ubuntu... just so I'd have some internet to use.[/ot] The only version of Ubuntu that I have is Breezy Badger (5.10). Kinda old I know. So I figured I'd go through the tutorials out there and upgrade one distro at a time.. by editing the sources.list. Because I've gotta have Firefox 3 at the least. Anyway.. I got to Dapper just fine. When I attempted to move to Hardy... I believe a bunch of things failed in the process.. Why? I don't know. Nevertheless, when I rebooted.. All of the letters are squares now. The desktop is full of them.. the entire GUI uses this square font. If I didn't know which icon was "The Internet".. I wouldn't be typing right now. By the way.. Firefox seems to use a different font instead of squares thank god. I have no clue which one but it's awful..though I can at least recognize it as english. After some googling I come across some paths to the fonts.conf file. I tried to edit it and it says there is no write permission. I tried to open it with the file manager(nautilus) and a multitude of errors appeared... most all saying something having to do with "pango".. which I assume is the f'd up font. Does anyone have a clue what I could do to remedy this. Some kind of command. I figured I had this upgrading business down pat until everything turned to squares... :'(
-
Much appreciated David! You'll find that the longer you stick around (throwing your 2 cents into those interesting topics), the more you'll learn. At least that's the way I started out. [ot]Although, I did start out with a book before I came to this site. I used that book so much that the pages started falling out and the spine of it began to wither and break.[/ot]
-
Not tested but might work. $var1 = $_POST['note1']; $var2 = $_POST['com1']; $var3 = $_POST['note2']; $var4 = $_POST['com2']; $x = 1; for($i= 0;$i $x = ($x someFunction(${'var'.$x}, ${'var'.$x++}); $x++; }
-
What do you think of the new look of these forums?
Zane replied to smerny's topic in PHPFreaks.com Website Feedback
Glad you like it.. I'm glad it's finally implemented. (i.e I finally got all the bugs out) Next step is to get my Active Users mod updated. (any suggestions for improvement on that?) -
It's back! Make use of it.
-
This is your "comment" box... I'm assuming Enter your message here. Notice that it's named message? Notice below how you're not looking at message.... but "comment"... which doesn't exist
-
Are you sure that you have everything named correctly.. what does your HTML form look like? another way to check these kind of things is this $formSuccess = false; foreach($_POST as $formElement => $value) { if(isset($_POST[$formElement]) $formSuccess = true; else $formSuccess = false; //Then for the comment one. if($formElement == 'comment' && $value == 'Enter your message here.') $formSuccess = false; } if($formSuccess) { //send mail } else { // Error } or even shorter $formSuccess = false; foreach($_POST as $formElement => $value) { $formSuccess = isset($_POST[$formElement]); if($formElement == 'comment' && $value == 'Enter your message here.') $formSuccess = false; } if($formSuccess) { //send mail } else { // Error }