Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. You'll need JavaScript and Ajax to achieve the dynamic modification. Because access works with multiple databases you'll also need PDO or ODBC on the server side. JSON or XML for communication between client and server. Because today most JS libraries incorporate Design Patterns (UI) like on YDN(1) you will be able to create a rather complex UI quite easily. Adding the appropriate functionality (js user functions) creates your Access clone. Happy Coding 1. http://developer.yahoo.com/ypatterns/
  2. In order to access object variables you need to pass the object reference ($this) to your function/object. protected function _executeHooks($identifier) { if ($hooks = $this->_getRegisteredHooks($identifier) && $hooks->count()) { foreach ($hooks as $hook) { try { $this->_executeHook($hook); } catch(Exception $e) {/* In case an invalid hook would make it to the hooks ArrayObject */} } } } protected function _executeHook(Hook $hook) { $hook->execut($this); } protected function _getRegisteredHooks($identifier) { return $this->_hooks->offsetExists($identifier) ? $this->_hooks->offsetGet($identifier) : new ArrayObject(/* NullObject */); } This is ofcourse just an example and may differ depening on your OO design
  3. Why would you disallow people to view other people's ticket? I have used support a few times now and they sometimes redirect me to another person's ticket to provide me with a possible solution. Atleast Steam did that when I had some trouble with my videocard and L4D. Another option is to use something like: Q3T47H-4S4S37-34TSK7-4Q37YT No idea how this is called Steam uses it and Microsoft uses it to identify components or something.
  4. If you have the possibility create a new database with all the tables of your current database and copy the data to it. This is usefull because now you can keep using your current application (as the table names remain the same). Give your database account only read access to this archive database (so no data can be changed). And through a dropdown you can then switch between the archive and your active data. If all data has been successfully transfered perform a truncate on all tables. If you don't have the option to create a new database through account limitation or hard-drive space I suggest you use something like outfile(1) or perform a sql dump(2) 1. http://dev.mysql.com/doc/refman/5.0/en/select.html 2. http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
  5. $QUERYVAR= parse_url($url, PHP_URL_QUERY); $GETVARS = explode('?',$QUERYVAR); You should read the documentation more carefully Thus PHP_URL_QUERY returns parameter=value And your code should have been: $QUERYVAR= parse_url($url, PHP_URL_QUERY); list($is,$what) = explode('=',$string); echo "$is -> $what<br/>"; Edit: A second look saw this: $url = $pageURL; Which should have been: $url = curPageUrl();
  6. I started programming back in november 2005 when my dad hooked me up with a project for his company (airtraffic control), however at that time I had limited knowledge of HTML and CSS and PHP had I only heard of by name. I can't remember exactly how I pulled it off (altough the code gives me a good idea) but they were happy with the end result and they still use it till this very day. Since then have I also been telling me I should update the website but I still haven't got around to it. Now 4 years later I have a good understanding of PHP (I know what (int) 'E' and sizeof('hello') outputs), SQL, HTML, JS, CSS, OOP and OOA&D (which I really love). Through high school I learned Java and VB.NET. In college I learned COBOL (yes they still teach that) and ASSEMBLER (yep that to). Currently I am combining work (PHP developer) and college to pay my studies.
  7. @omzy no alt text was defined.. @mjdamato trying to answer to quick ? Because you forgot the alt attribute which is required on the img tag.
  8. Thx salathe it indeed only matches one single lowercase letter and I'm no Regex guru. Is it possible using Regex to create a pattern that will fail if a non-lowercase letter is found?
  9. ignace

    Using &

    No it's not a pointer it's a reference but not as you may know them check http://www.php.net/manual/en/language.references.php for a detailed explanation
  10. How so? The way I see it you are limited to a-z so something like ../../. wouldn't work or am I missing something?
  11. Hi I'm fairly new to Linux and I have already ran into a problem I have a web-application running onder /var/www/html which uses the Zend framework in my bootstrap file I have this code: define('URI_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR); define('URI_LIBRARY', URI_ROOT . 'libraries' . DIRECTORY_SEPARATOR); function add_include_path($include_path) { $include_path = implode(PATH_SEPARATOR, array(get_include_path(), $include_path)); set_include_path($include_path); } add_include_path(URI_LIBRARY); require_once('Zend/Application.php'); But I get an error which says it can't find Zend/Application.php Thus I tried: print is_readable(URI_LIBRARY) ? 'readable' : 'not readable'; Which returns not readable and explains why Zend_Application was not loaded. So I tried changing the path to library and ./library afterwards to no avail. Also changing the CHMOD on both the bootstrap or the library (which are currently 755) does not help. Any advice?
  12. Chapter 5 discusses the differing algorithms used in search queries like boolean-, natural language-, thesaurus-, term searches query Chapter 6 discusses optimalisation or relevant results for a certain query Chapter 7 discusses both PageRank and HITS-method. These chapters are the most interesting chapters of the total 8 chapters included. Ch 5 deals specifically with what you are looking for. Check your local city library if they don't have it recommend it to them and pick it up later The book has in total ~100 pages so if your Math skills are not so bad you may be able to read it in one-night If your not to keen of writing your own search engine, you may want to try Lucene. Zend framework has a decent implementation for interfacing with Lucene.
  13. [ot]Anyone know good songs in the same rhytm of Drowning Pool - Bodies?[/ot]
  14. http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ Include this script in your main css file like so: @import url(reset.all.css);
  15. The image above FOR RENT is not clickable while FOR SALE is
  16. There's a good book on the subject named: Understanding Search Enginges Mathematical Modeling and Text Retrieval
  17. Good song But not something to play at Christmas eve
  18. @salathe would my solution work? http://www.phpfreaks.com/forums/index.php/topic,281354.msg1333298.html#msg1333298
  19. @skunkbad I use indeed an auto_increment I actually got to question myself these answers because of this use-case: A user opens a page for editing during his editing session no other user is allowed to edit this page (as one may overwrite the work of the other) However what happens when users at the same time open this page for editing? So I figured something like this might work: LOCK TABLES page WRITE; UPDATE page SET editor_id = :user_id, is_locked = true WHERE id = :page_id UNLOCK TABLES; And afterwards I would use a query like: SELECT * FROM page WHERE id = :page_id && editor_id = :session_user_id However my knowledge of DBMS is limited and I have no idea what the DBMS will do in the event two users query at the same time to lock a table.. Or what happens when a table is locked while another tries to retrieve information? Something different I am also pondering about is NOT NULL should I write it? As most do not. I can understand why as when one column gets added with a not null and somewhere in your application it updates a few columns in this table then this query will fail and thus your application will break. Any advice?
  20. I got it solved they finally answered my e-mail spam.. They will change the ns settings tomorrow morning. @oni-kun The problem is that my client had it's website hosted and developed by the hosting company but never got any details (like FTP, CP, ..) So I was left to the mercy of that hosting company to change the ns settings so my server would be hosting the domain name from now on. Thanks everyone for your time.
  21. Hi How would I need to go about when 2 users update a single row simultaneous? And how would I need to go about when 2 users want to edit a row? Should I first lock the table, update the row to indicate who is editing the data unlocking the table and selecting the row where the editor_id = the current user_id? Plus what happens when I lock the table do other users get a failed query? and what errno does mysql return in this case? Do I need to use not null on required fields or should I leave it out?
  22. <script type="text/javascript"> var modelSelect = document.getElementById('model'); var sizeSelect = document.getElementById('size'); function enableModel() { if (modelSelect.disabled) modelSelect.disabled = false; //perform Ajax query, fill select with data } function enableSize() { if (sizeSelect.disabled) sizeSelect.disabled = false; //perform Ajax query, fill select with data } </script> <select id="make" name="make" onchange="javascript:enableModel();"> .. <select id="model" name="model" onchange="javascript:enableSize();" disabled="disabled"> ..
  23. case '$page1': won't work neither will case "$page1" unless your user would type something like ?act=<!DOCTYPE html .. >\n<html ..>\n..
  24. define('URI_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR); define('URI_PAGES', URI_ROOT . 'pages' . DIRECTORY_SEPARATOR); function render($page, $variables) { $page_path = name2path($page); if (!@require_once($page_path)) { trigger_error("Page $page_path could not be loaded."); header('HTTP/1.0 404 Not Found'); exit(0); } } function name2path($page) { return URI_PAGES . $page . '.php'; } $default_page = 'about'; $request = array_merge($_GET, $_POST); $page = isset($request['page']) ? $request['page'] : $default_page; if (!preg_match('/[a-z]/', $page)) { trigger_error("Incorrect page format given: $page"); render('error', array('errors' => 'Page not found.')); exit(0); } render($page, $request);
×
×
  • 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.