premiso
Members-
Posts
6,951 -
Joined
-
Last visited
-
Days Won
2
Everything posted by premiso
-
Parse error: syntax error, unexpected T_STRING
premiso replied to fantity's topic in PHP Coding Help
"Cloud" Fuggin buzz words. -
I really do not like Putty, I use xShell4 I <3 that! *premiso just likes to troll =\
-
...seriously?
-
Just upload it yourself and use a custom one? ... seriously?
-
http://www.wired.com/gadgetlab/2012/04/6-glasses-with-integrated-displays-that-you-can-buy-today/
-
How do I find complete error messages with MS SQL 2000?
premiso replied to tcarnes's topic in Microsoft SQL - MSSQL
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. -
It just needs a massive wifi antenna and we are in business!
-
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.
-
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.
-
How do I find complete error messages with MS SQL 2000?
premiso replied to tcarnes's topic in Microsoft SQL - MSSQL
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. -
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")
-
How to generate a MS Word document and open it in Landscape orientation?
premiso replied to benphp's topic in PHP Coding Help
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. -
Now maybe the learning process can begin, young turd on a stick.
-
This is just too good to pass up. http://lnked.me/ln09h
-
Dully noted, please take care not to let it happen again.
-
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.
-
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.
-
Is that even possible?
-
This topic has been moved to MySQL Help. http://forums.phpfreaks.com/index.php?topic=365139.0
-
Using substr: $lastInt = substr($multiplication, -1, 1);
-
This topic has been moved to PHP Regex. http://forums.phpfreaks.com/index.php?topic=365037.0
-
That is why I tend to use dots more often than slashes after I cd to a directory
-
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.
-
This topic has been moved to MySQL Help. http://forums.phpfreaks.com/index.php?topic=365122.0