Jump to content

GingerRobot

Staff Alumni
  • Posts

    4,082
  • Joined

  • Last visited

Everything posted by GingerRobot

  1. 1.) Looks to me like half of the strings are unquoted. You must place quotes around any values of your fields which are strings. 2.) Whenever your having problems with a query, add an or die statement that will echo the mysql error: mysql_query("....") or die(mysql_error());
  2. Well, if you want to be using a number to refer to the page, but the pages are given a proper name, then i suggest you use a database to store the ID and the page it refers to.
  3. Sounds like you want a UK keyboard! The backslash is pretty much always left of z, and backspace is a double key. And the Insert, Delete etc keys are pretty much always layed out 3x2.
  4. Yeah, the graph theory certainly is interesting. Here in the UK it's now possible to do modules in this kind of thing as part of a Maths A-level. Certainly makes a nice break from pure maths or mechanics! Sounds like the content was much less detailed than your course however. I guess the idea of it is to give a fairly general introduction to algorithms and their applications. It's not all just graph theory; there's some chapters on algorithms for other problems, such as the Hungarian algorithm, the Simplex algorithm (which is a bit of a pain, it would be so much easier to write a program to do it!) linear and dynamic programming, sorting and a bit about game theory. One chapter that stands out was one which just contained questions asking you to draw up a table of the values that different variables took when following some pseudocode. It was hilariously easy. I guess that's my main criticism of the modules: they really do lack detail in some areas. There's barely any mention of the complexity of algorithms, which is a bit of a shame - that seems quite interesting in some areas. I also found the definitions of the algorithms quite odd at times; they quite often involved steps requiring human intuition, which seems to rather defeat the object of an algorithm! That said, i'm sure it's been quite useful to study this stuff prior to my CS degree.
  5. To be honest, that tends to happen almost every time Barand answers a post that i'd previously answered.
  6. As for the fibonacci one, a recursive function would be fine for small numbers, but pretty hideous for larger ones. A bit of digging and once again i realise how little maths i know. I've never heard of this golden ration business, which can be used to calculate larger numbers in the fibonacci sequence. Your posts are always interesting roopurt and they often remind me why i've just applied to study computer science for 4 years!
  7. Hmm, i think this one: Is the only which i would know where to start. Although, i think there are two separate questions here? I think i could probably make a reasonably attempt at implementing Dijkstra's algorithm for finding the shortest path. Not sure where i'd begin with the travelling salesman problem though.
  8. Personally, i wouldn't touch it with a barge pole. Have you seen the grammar(or lack of)?
  9. There are an awful lot of thing syou need to check and change. You should have a hidden field with a max file size set, which may need to be changed. You may also need to change various PHP settings in your php.ini file - including the max_file_size and max_execution_time.
  10. 1.) Where's the switch loop? 2.) You need to be passing your query through the URL with your page links. You are searching where your category is a particular value. You need to be able to maintain this search criteria across the pages.
  11. Forgot to post the link: https://addons.mozilla.org/en-US/firefox/addon/3829
  12. Fair enough - i couldn't view the site to check, since im at school and we have very annoying filters. Not entirely sure how a limit would be affecting the sorting.
  13. I suggest you use firefox, along with the live HTTP headers addon to help you analyse everything that is being sent when you make the request yourself. It might help you identify something missing from your automated request. Its a very useful tool when dealing with cURL requests.
  14. Erm, if its ordering like 1200, 340, 8, then its just ordering DESC. You need it to order ASC.
  15. It works in IE7 as well. As in IE6, the code block drops below the ad.
  16. Personally i can't see them ever ousting google.
  17. Unsolicited is the keyword in the definition of spam, so yes, this is spam.
  18. Edit: ignore. Its late and im being particularly stupid
  19. That was my next question. Dont worry though, tis always the small things that catch you out.
  20. Remove this line: $rrow = mysql_fetch_array($articlesll); You should not make a call to any of the mysql_fetch_xxx functions prior to using them in a loop. When you call this function, you move the pointer forward. Next time it's called, it points to the second row in the returned result.
  21. See yesterday's topic about this: http://www.phpfreaks.com/forums/index.php/topic,179356.0.html
  22. Right, well it looks to me like the links are being generated correctly. Therefore, im going to go with my above statement: Perhaps you do need to be passing page=search through the url; i do not know, since i do not know how the rest of your script works. However, what you certainly need to be doing is passing the query you have made to the database through the URL (you will probably want to just pass the where clause and any order by clause). You will then only want to show the search form if the URL does not contain the database query. When you say it's quite long, if we're talking a few hundred lines, then you may as well post it up if you get stuck.
  23. You're creating these pages manually?! Ouch. I suggest you look into pagination. There's a tutorial here on the subject.
×
×
  • 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.