ignace
Moderators-
Posts
6,457 -
Joined
-
Last visited
-
Days Won
26
Everything posted by ignace
-
After finding what the red button did, I was kinda disappointed you didn't support the konami code.
-
To get "around" the binary math problem of close-enough. You can use the BC Math extension. Be sure though that the number is always a string both when storing (or use DECIMAL if your precision is smaller than 65) and manipulating or your result may be off: $var = bcdiv(1, '0.0015625'); // note the quotes
-
I think this will do what you want. public function getBonusChildren($userID) { // retrieve all children of $parent $sql = <<<SQL SELECT userID, (SELECT count(userID) FROM jos_backoffice_users T2 WHERE T2.parentID = T1.userID) child_count FROM jos_backoffice_users T1 -- WHERE mem_status = ? SQL; $rows = conn::getInstance()->query($sql)->fetchAll(); return $rows; }
-
I don't know how I should phrase this so everyone understands what I want to do, so I'll try an example: http://www.zimmo.be/nl/Leuven/Te-Koop/Woning/7QVD7/ Take a look at the above website. The lower part of the webpage is an iframe although it doesn't "appear" to be since there is only 1 scrollbar that covers both the iframe and the website. That is what I want to achieve, the above website uses a iframe with a height of ~2300px, I want to be able to do the same thing except without having to set the iframe to 2300px. I found the HTML5 iframe attribute seamless="" but it's not supported in any browser. So is there anyone who knows how I can do this without having to go the "use a proxy script" way? Since there is no support for seamless, maybe there is a CSS way in how to do this? @scootstah If you read my post you would have found that I have put quite an amount of time in finding a solution before coming here to ask a question. It's quite hard to find something if you don't know what you are looking for. If I add 100% to the iframe, I get a double scrollbar and I want to avoid that.
-
I have an annoying problem: I want to show an external webpage on my website in an iframe with no scrollbar (as if it were part of the parent document). I have looked around but due to the XDomain Policy I can't access the height of the webpage. I currently want to exclude the proxy method to resolve the issue and see if someone's has any bright ideas. I thought there would be a CSS3 rule that I could use to tell the browser how it should render the iframe.. but I didn't find any. I found the seamless attribute for HTML5 but it is not supported in ANY browser. http://www.maxdesign.com.au/2011/03/10/iframe-scrollbars-and-html5/
-
That you are missing a few tables No need though to separate age and sex from other member info. members (member_id, group_id, member_firstname, member_lastname, member_username, member_password, member_age, member_sex) addresses (member_id, address_id, address_type_id, address_street, address_number, ..) address_types (address_type_id, address_type_name) groups (group_id, group_name)
-
[jquery] deactivation of button after clicking "<li>"
ignace replied to AndyPSV's topic in Javascript Help
Keep this up AndyPSV, and you'll find all your marketing work in the vicinity of /dev/null Yes, that means you have been reported. THIS SHIT DON'T STICK HERE! -
HELP WITH UNDERSTANDING THE MAGIC FUNCTIONS __get() and __set()
ignace replied to chams's topic in PHP Coding Help
You can add properties dynamically to any object: class MyObject {} $obj = new MyObject(); $obj->propertyName = 'propertyValue'; print_r(get_object_vars($obj)); // Array ( [propertyName] => propertyValue ) This works even for classes that do not implement __set() and __get(). If you want to disable/overwrite this behavior then implement __set: class MyObject { public function __set($k, $v) {} } $obj = new MyObject(); // object $obj->propertyName = $propertyValue; print_r(get_object_vars($obj)); // Array ( ) This does not work if the property actually exists (that is: with a public access modifier) class MyObject { public $propertyName = ''; public function __set($k, $v) {} } $obj = new MyObject(); // object $obj->propertyName = 'propertyValue'; print_r(get_object_vars($obj)); // Array ( [propertyName] => propertyValue ) In Conclusion __set() and __get() allow you to create, read, and write to dynamic properties. A dynamic property is a property that has not been defined upon construction of the object (public $propertyName = '';. -
Thx Pikachu now I can finally sleep on both ears (don't laugh! I have practiced 20 years to be able to do that!).
-
Is there a risk of PHP ever becoming Proprietary?
ignace replied to westonkenny's topic in Miscellaneous
PHP is developed/maintained/documented by individuals like you and me (some of them are even on this very forum) not by some corporation so the chance of PHP becoming proprietary is non existant. Java on the other hand is developed/maintained by a company with commercial interests. When a single person is developing a piece of software you might wanna think twice before actually using it, since updates to the project will be very sparse and finding support for the product is very hard. So sometimes it's better to stick to an open-source company to get support for a product. This should be obvious since open-source technology costs you $0, that said though always keep in mind that 1) you want bugs fixed so verify it's an active project and 2) at some point you may need support. Make sure you can find it, when you do. -
Is that your real motivation? Or is that marketing signature and this website's good standing with Google your real motivation?
-
And hello to you! I wonder what wicked things I'll be doing at 63
-
Hi, Does anyone know of a web application similar to http://floorplanner.com/ with good support for integration in your own website?
-
It's a bug in IE. You need to contact Microsoft (ie-support@microsoft.com) and tell them to fix the bug so that your website looks good in their browser.
-
Just out of curiosity... Facebook.
ignace replied to phpfreak's topic in PHPFreaks.com Website Feedback
And I'm also sure a Guru/Mod pissed him off. Kinda like this guy http://www.phpfreaks.com/forums/index.php?topic=347813.0;topicseen -
Here it is. Can't believe you missed it ??
-
Yep. You can't get any more low-level than that ;-) Otherwise I would advice Assembler for the Intel processors.
-
I'm here to help, not to do the job for you. Analyse, edit, run! Repeat. I'm not going to be there to hold your hand when you are on someone's payroll. Have you tried it? I already know the answer: Yes, that is also correct. If you want to pursue a career in programming you should start doing to. A possible correct answer is: SELECT genre_id IN(SELECT genre_id FROM user_genre WHERE user_id = 1) user_has_genre, genre_name FROM genre; Yet you made 0.0 attempt at trying to solve it yourself.
-
Which is the Most Efficient Way to Generate an Unique Random Number?
ignace replied to Glese's topic in PHP Coding Help
Programming is pretty industrial and lifeless. You can always throw some art it's way: http://acme.inc/this-is-not-a-pk/1 -
<?php // untested $sql = "SELECT * FROM genre LEFT JOIN userGenre USING genreID WHERE userID = " . intval($userID); $res = mysql_query($sql); while ($row = mysql_fetch_object($res)): ?> <tr> <td><input type="checkbox" name="type"<?php print !empty($row->userID) ? ' checked="checked"' : ''; ?> value="<?php echo $row->genre;>" /><?php echo $row->genre; ?></td> </tr> <?php endwhile; ?> Learn SQL. Exotic solutions like yours won't always help you solve certain problems.
-
That's a PHP error not MySQL. Post your code.
-
You store the entered text in your database. And when you retrieve it, you resolve any @Username text to a link. Something like: // untested. if (preg_match('~@([^\s]+)~', $row['input'], $matches)) { if (username_exists($matches[1])) { $row['input'] = str_replace($matches[0], '<a href="' . username_link($matches[1]) . '">@' . $matches[1] . '</a>', $row['input']); } }
-
He's saying that you should replace this line of code: while {$row = mysql_fetch_array($results,MYSQL_NUM)} With while ($row = mysql_fetch_array($results,MYSQL_NUM)) It's advised to consult the manual if you are new.