Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. Apparently you are not aware of the Legal Agreements document on Paypal which states:
  2. No. But following the logic, you are after a LEFT OUT JOIN
  3. You use a Blog which is all fine, the reason I adviced resources like tuxradar is that they have a TOC and therefor can guide novices in to the more advanced topics. I also think your tutorials assume a certain knowledge on the visitor end on computers and computer programming, like the CLI is new to them and therefor confusing as they want to execute it in the browser (they wanna see their output in the browser -> their goal). They will assume you are talking about something else, also PHP related. At this point they may even think there are multiple PHP programming languages.
  4. if (false != ($result = mysql_query('SELECT .. FROM table')) { if (0 < ($row_count = mysql_num_rows($result))) { $page = ctype_digit($_GET['p']) ? intval($_GET['p']) : 1; $items_per_page = 20; $number_of_pages = floor($row_count / $items_per_page); $offset = ($page - 1) * $items_per_page; for ($index = $offset; $index < $row_count && $index < $offset + $items_per_page; ++$index) { $field1 = mysql_result($result, $index, 'field1'); $field2 = mysql_result($result, $index, 'field2'); } } mysql_free_result($result); }
  5. There isn't much to it. Not after I posted the above query, now all that's left is to copy-paste and top off with query processing.
  6. To answer your actual question though: If this is in the form of tuxradar.com, killerphp or survive the deep-end then please go for it. Novices need these kind of resources to help them advance in the subject and there aren't that many great out there.
  7. Mainly because I don't know how to write a Flash program.. And because some of the things I want to do I don't think are possible in Flash.. ActionScript for Multiplayer Games & Virtual Worlds
  8. $element = $doc->createElement( 'image' )->appendChild( $doc->createElement( 'src', 'test' ) ); $element->setAttribute( 'name' , 'img11' ); $doc->insertBefore($element, $xpath->query( '//[@name=img02]' )->item( 0 ));
  9. With header() you can send response headers.
  10. SELECT count(id) AS count FROM buyers GROUP BY Country UNION SELECT count(id) AS count FROM suppliers UNION SELECT count(id) AS count FROM products -- OR SELECT count(SELECT id FROM buyers GROUP BY Country) AS buyer_count, count(SELECT id FROM suppliers) AS supplier_count, count(SELECT id FROM products) AS product_count; Requires only 1 query instead of 3
  11. teams (team_id, team_name) games (game_id, game_date_time, game_team1_id, game_team2_id) bets (bet_id, bet_score_team1, bet_score_team2, bet_game_id, bet_user_id) I am not a football fan nor do I know how the world cup works, but this may help you on your way.
  12. c:\xampp\htdocs\zf\myapplication\
  13. You don't need the sitemap. Just start out by looking for a robots.txt file and respect the rules specified then start out by reading the index.html and obey the <meta name="ROBOTS"> tag if present. Fill your queue with any URL you find. Store whatever you think is relevant and continue with the next URL in the queue.
  14. MySQL is great for most applications and it's very fast. They provide InnoDB for each application that requires some minimal data constraints (beyond indexes) on a database-level. When however your data-constraints become more and more important in an application, you'll find that MySQL is no longer your best option and most would switch to PostGreSQL. I'm no database expert of course. I'm just telling you what I've learned over the years.
  15. Register the namespace Application_ and it's path with the Loader, you can do this within your configuration file. http://framework.zend.com/manual/en/zend.application.core-functionality.html autoloaderNamespaces.Application_ = "library/Application/"
  16. http://en.wikipedia.org/wiki/Post/Redirect/Get
  17. if (isset($_POST['field1'], $_POST['field2'], $_POST['field3'], ..)) { Returns false if any of those fields is not defined.
  18. Not sure what you want to achieve, but: <span> <a href="tell_a_friend.php?url=<?php print 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']); ?>"> Tell A Friend </a> </span>
  19. It better be good Colombian one My sinuses are already screwed due to all the drug-abuse What are the chances you'll ever really do that? Buy me a book and ship it to me, so that I can help you even better in the future
  20. Why would you do that? CI is modular enough to add these features for all clients but restrict them to those who do not pay for them. This also means that whenever a client wants a new feature added it can be enabled upon payment where-as the module becomes available only when you uploaded the necessary files and made the necessary modifications.
  21. Yes. __set($offset, $value), __get($offset)
  22. $db = mysql_connect('localhost', 'web225-content', '..'); if (!$db) { trigger_error('..' . mysql_error(), E_ERROR); header('HTTP/1.0 500 Internal Error'); header('Location: 500.html'); exit(0); } if (!mysql_select_db('web225-content')) { trigger_error('..', E_ERROR); header('HTTP/1.0 500 Internal Error'); header('Location: 500.html'); exit(0); } $query = trim($_GET['q']); $query = preg_replace('#[^A-Za-z0-9 ]#', '', $query); if (3 < strlen($query)) {//words with less then 3 characters are considered invalid $query = mysql_real_escape_string($query, $db); $query = 'SELECT thearticle, REF FROM cmsarticles' . " WHERE thearticle = '$query' OR thearticle LIKE '%$query%'" . ' ORDER BY id'; $result = mysql_query($query, $db); if (0 < ($row_count = mysql_num_rows($result))) { $page = ctype_digit($_GET['p']) ? intval($_GET['p']) : 1; $items_per_page = 20; $number_of_pages = floor($row_count / $items_per_page); $offset = ($page - 1) * $items_per_page; for ($number = 1, $index = $offset; $index < $row_count && $index < $offset + $items_per_page; ++$number, ++$index) { $thearticle = mysql_result($result, $index, 'thearticle'); $ref = mysql_result($result, $index, 'REF'); echo "$number. <a href=\"$ref\">$thearticle</a><br>\n"; } mysql_free_result($result); $previous = array_merge($_GET, array('p' => $page - 1)); $next = array_merge($_GET, array('p' => $page + 1)); echo ((1 < $page) ? '<a href="index.php?'.http_build_query($previous).'">< previous</a>' : '<strong>< previous</strong>'), ' ', (($page < $number_of_pages) ? '<a href="index.php?'.http_build_query($next).'">next ></a>' : '<strong>next ></strong>'); } }
  23. 1. while($board=mysql_fetch_array($r2)){ $r3=mysql_query("SELECT * FROM `forum_thread` WHERE `thread_boardid` = '".$board['board_id']."' AND `thread_deleted` = '0' ORDER BY `thread_id` DESC") or die(mysql_error()); This is the equivalent of a JOIN, use it: SELECT * FROM forum_thread JOIN forum_board ON forum_thread.thread_boardid = forum_board.board_id ORDER BY thread_id DESC
×
×
  • 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.