Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. ok.... so or die() ceases to do it's job for some reason today?? Try this and see what happens $query2 = mysql_query($updateQuery2) === false ? die("Failed Query: \n" . $updateQuery2 . " \n" . mysql_error()) : mysql_query($updateQuery2);
  2. Yes, and if there were something wrong with your query it should have shown your an error. Now you're at the point where you have to go to the top (the very top) of the script and put error_reporting(448191); ini_set("display_errors","on");
  3. No more shameless than a Pokemon.
  4. Tryin' to jack some runner-up credit are ya? Like an assist in Halo.
  5. when in doubt... use "or die()" mysql_query($updateQuery2) or die("Failed Query: \n" . $updateQuery2 . " \n" . mysql_error());
  6. $_GET[uid] needs to be $_GET['uid'] and you can't do that without concatenating... well, or using curly brackets, but anyway $updateQuery2 = "UPDATE preview SET draft='false' WHERE uid='" . $_GET['uid'] . "'";
  7. Apparently you've been dabbling in SOME code already in order to come up with this. As MrAdam put it so well, provide us with some reason as to why you are having problems. We're not mind readers. We need a little bit of code.... Screenshots preferably.
  8. What makes you think that? You have only thrown us a bunch of code and said, something is wrong... elaborate a little.
  9. That makes no logical sense. If you were to do that, you would be adding tags. Or better yet, splitting the tags the user wanted. Let's say I explicitly wanted a tag called "pot_roast"; If I replaced the underscore with a comma before exploding, then I would have 2 tags.
  10. I'm not exactly sure what "format" you're looking for, but you can use PHP's explode() function to explode on commas. Then you will have an array of everything..... that is separated by commas. For instance $inputField = "cats, dogs, birds, burds, turds, water, pall, mall, cigarettes"; $tags = explode(",", $inputField) Then at which point you might want to "validate each tag... or trim of whitespace, or malicious characters foreach($tags as $v=>$tag) $tags[$v] = mysql_real_escape_string( trim($tag) );
  11. because it's an invalid statement. $return must do something to mysql_num_rows; That is assuming you want a variable named $return. Possibly you want return mysql_num_rows() without the dollar sign?
  12. Are you using MySQL's MD5/SHA hash or PHP's If you meant to use PHP's then you have a parse error -try this cape2 . "' AND Password = '" . md5(sha1(hash( 'whirlpool', $escape ). "') or die
  13. mysql_connect(blah blah blah) or die("Error Message") Most people will argue that trigger_error() is the "proper way" to do it, but really, the proper way is to have a Database Class and have it do all that error checking stuff for you. if you use the mysql_error() function .. (instead of "Error Message") it will give you the reason the connection failed, but for some reason I don't think you want that.
  14. SELECT SUM(totalvotes) as total_three FROM ".DB_DATABASE.".bonusvotes_2010 WHERE bonusvotes_2010.contestantID IN ('3460','242') AND bonusvotes_2010.status='Valid'
  15. if you give a function an &$variable, then whatever is done to that variable within the function is relegated back to the variable you put as the argument. For instance function addOne(&$a) { $a += 1; } $b = 1; echo $b; // Prints 1 addOne($b); echo $b; // Prints 2
  16. mysql_num_rows($query1) + mysql_num_rows($query2);
  17. Check this thread out on bitwise operators http://www.phpfreaks.com/forums/index.php/topic,113143.0.html It's just what you're looking for.
  18. This can only mean that you're getting an Error of "Error", ...right? If you use PHP's mysql_error() function you'll get the precise error and then you can tell us exactly what's wrong. mysql_query("INSERT INTO subscriptions (email, confirmation number, verified) VALUES ($email, $confirmation_number, 'no')") or die(mysql_error()); I'll bet you it has something to do with your column named confirmation number.
  19. ')"); or die(); You've got one semicolon too many, that's it.
  20. This is a quote from the manual.. on the heredoc part
  21. take out the null statement and make it just this $form = null; $form = notice I didn't use .=
  22. It's called Mod_rewrite.
  23. Did you try switching id and quotes around maybe?.... ya know, querying distinct Quotes instead of IDs. SELECT DISTINCT quotes, id FROM quotes
  24. This should be of some use to you. PS. I found it with Google using the search term "Unable to fork"; and it was the first one on the list http://www.somacon.com/p255.php A quote from the page
  25. It's as easy as doing this $variable = mysql_real_escape_string($_POST['variable']); Just like any other function.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.