
ignace
Moderators-
Posts
6,457 -
Joined
-
Last visited
-
Days Won
26
Everything posted by ignace
-
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 ([email protected]) 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.
-
Are there any free keyloggers out there that apply to Mac?
ignace replied to Tinney's topic in Miscellaneous
Protecting your kid as well as his privacy is the best thing. I personally think you need to have a talk with him, let him know which kind of sites will harm him, and you also need to tell him the reason. It better to educate him rather than control him. And of course, if you failed to have a talk, you can use the parental control sogtware. I agree. Talk to him instead of trying to be his puppeteer, you'll fail in the latter anyway. -
Would like some critique on some tutorials I've written
ignace replied to mikesta707's topic in Website Critique
Unity for sure! :-) -
Would like some critique on some tutorials I've written
ignace replied to mikesta707's topic in Website Critique
I really like your writing style. -
How long does it take to execute a while loop on 400,000+ records?
ignace replied to sqlnoob's topic in Microsoft SQL - MSSQL
You could create a procedure in MySQL for it so you only get the records that actually rhymes with the word instead of finding a word that rhymes in PHP. If that sounds too difficult you could try mysql_unbuffered_query which, unlike mysql_query, does not store all 400k+ records in-memory. Create a lookup table that stores all rhymes when one is found (word_id, rhymes_with_id) to speed up future searches. Currently you have used an auto_increment as a primary key maybe you could convert every word to an integer (since it's a limited set although you could get a collision so backup before you do). // for a 32-bit signed integer, use 15 if you are running PHP under x64 architecture (and use a BIGINT in MySQL) $word_id = hex2int(substr(md5($word), 0, 7)); Or in MySQL using: UPDATE words SET word_id = conv(substr(md5(word), 1, 7), 16, 10) You don't need MySQL then to find the ID of the word as you can calculate it's ID in PHP (saving a round-trip). $word_id = hex2int(substr(md5($_POST['search_word']), 0, 7)); -
Javascript file that appeared on our webserver
ignace replied to khavelka20's topic in Javascript Help
It loads an URL through either an iframe or an img. The website it loads is: nanitos99142.co.cc/main.php?page=a911bd6268796cac Delete the file and any occurences of the filename and change your FTP password to something with upper and lower case letters + numbers + special characters. Also contact your webhosting provider. It's possible that they were able to install the script through another user on the shared hosting machine. -
Thank you both.