Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. I really do not like Putty, I use xShell4 I <3 that! *premiso just likes to troll =\
  2. Just upload it yourself and use a custom one? ... seriously?
  3. http://www.wired.com/gadgetlab/2012/04/6-glasses-with-integrated-displays-that-you-can-buy-today/
  4. Basically, you do not want a production system to show errors to everyone. I am not sure how it was setup prior to, but you can use the ini_get to get the value of it and re-set it to that after the script runs. But it does need to be 1 for the error to be caught by the output buffer.
  5. It just needs a massive wifi antenna and we are in business!
  6. Or you just need to be around family (having kids) and not wanting to be limited to you range of a desk or having the desk in the entertainment room, sure. And NO YOU ARE WRONG.
  7. I love my gaming laptop. http://www.amazon.com/gp/product/B007MW73C2 Had it for about a month now, the dual fans out the back is awesome. Totally worth it if you want a decent gaming laptop...it is just a huge beast! The pictures do not do it justice.
  8. The messages coming from the first set were from the php function returning a warning to throw up a bigger error. It seems that it is how the MSSQL driver is coded. Looking at the mssql functions page: http://jm2.php.net/manual/en/function.mssql-get-last-message.php#12352 there is a code using output buffers (a hack imo) to catch the error and parse it to display prettier. Here is an updated version of that you can try and see if it fits your needs: function treat_mssql_error($buffer) { $buffer=preg_replace("#<br>\n<b>Warning</b>: MS SQL message:#i","<b>Error in query (SQL Server)</b>: ",$buffer); $buffer=explode("(severity",$buffer); return $buffer[0]; } function my_query($query,$cnx, &$sql_error="") { ob_start(); ini_set('display_errors', '1'); // you may want to check if this was enabled prior but yea. $result=mssql_query($query,$cnx); if(!$result) { $sql_error=treat_mssql_error(ob_get_contents()); ob_end_clean(); ini_set('display_errors', '0'); return false; } ob_end_clean(); return true; } You can expand this in many ways, such as using it in a class wrapper instead of a function etc, but that is the gist. Alternative, you can check and see if PDO will work for your needs, as I think it would handle the errors a bit cleaner...if it has MSSQL Server support.
  9. He probably wrote it with register_globals turned on, which is a security risk and has been defaulted to off since php 4. Basically that takes GET / SESSION / POST / COOKIE data and converts it to a variable, so $mode was probably inside one of those. To fix it, you just need to figure out where it was coming from and do something like: if ($_GET['mode'] == "new")
  10. You know, I just had a bowel movement and man, that was a relief. I think the orientation was set at Landscape, but not sure.
  11. Now maybe the learning process can begin, young turd on a stick.
  12. This is just too good to pass up. http://lnked.me/ln09h
  13. Dully noted, please take care not to let it happen again.
  14. Not knowing much else of your code, this is how it would need to be done, as shown by kicken $sql = "INSERT INTO info_cats (cat_id, info_id) VALUES (" . join(',', $values) . ") ON DUPLICATE KEY UPDATE cat_id = $values[0], info_id = $values[1]"; If you want something different, you will need to elaborate more on what you are looking for and possibly show more code.
  15. Is that even possible? Why would you even say that? Because everyone is thinking it, I am just the one asshole who spits it out.
  16. This topic has been moved to MySQL Help. http://forums.phpfreaks.com/index.php?topic=365139.0
  17. Using substr: $lastInt = substr($multiplication, -1, 1);
  18. This topic has been moved to PHP Regex. http://forums.phpfreaks.com/index.php?topic=365037.0
  19. That is why I tend to use dots more often than slashes after I cd to a directory
  20. Are you sure you do not want to group by the category? $query = "SELECT * FROM gift_db2 LEFT OUTER JOIN student_db ON gift_db2.category = student_db.name GROUP BY gift_db2.category ORDER BY gift_db2.grade DESC"; Not knowing how it is not displaying right, just a shot in the dark.
  21. This topic has been moved to MySQL Help. http://forums.phpfreaks.com/index.php?topic=365122.0
×
×
  • 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.