Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. I don't do anything with wordpress so I can't be much help to you, but it looks like you're on the way. You might have better luck making a new post with the title: "Help with embedding wordpress" or something similar, that will attract the wordpress developers here.
  2. If firebug is showing you the response data that the script should return, then I would look into the javascript code that works with the value. Firebug also has a javascript debugger. It's an amazing tool
  3. tom please use code tags around your code. mgoodman's code would of course require you to multiply his variable * $ir['bankmoney'], but it's cleaner than replicating the equation twice. However with that said, your code works. If you're not seeing what you expect it is probably because $ir['donatordays'] > 0 is not evaluating to true even though you expect it to be. You need to determine why that is, using echo/print_r/ or var_dump of your variables. Otherwise it could be something else further in your routines that save the computed balance.
  4. The first answer is, that your query that determines the overall result set you're going to paginate should just be a count(*) of the query you are then going to paginate using LIMIT. Any difference between the queries opens the door for the pagination to be off, because the number of rows in each of the different queries could vary, and in your case that is my best guess at your problem. If you have a query where you do SELECT DISTINCT id, category_id FROM ... you will already only get a row for each DISTINCT combination of id + category_id. If you needed to get a COUNT() of that same query it is important that you do a SELECT COUNT(DISTINCT id, category_id) FROM.... so that you get the same count of rows as the actual query will produce. An inner join creates a row anytime there is a match for values in the join column. For example: table_a ------- id: 2 name: red ----------- id: 3 name: blue ------------ id: 4 name: green ------------ And you have : table_b ------------- id: 1 name: apple color_id: 2 ------------ id: 2 name: apple color_id: 4 ------------ id: 3 name: berry color_id: 3 And you join these tables together on table_b.color_id = table_a.id, then you should expect to get 3 rows in your result set: apple - red apple - green crayon - blue Let's say you also have one more row in table_b id: 4 name: car color_id: 5 You run the same inner join again, you will get the same results set as before, even though there are 4 rows in table_b. Because there is no match for color_id in the table_a, a row will not be produced.
  5. When you say "it doesn't look like" that is not very precise. Have you used firebug's Net panel to see if the connection is occurring? You'd also be able to see the request in your web server access log.
  6. It sounds to me like the "shared" server in this case is actually specifically a "mysql" server. That is understandable and would require the ability for different hosts to access it as clients. Most typical shared hosts have a bunch of machines and they have a shared lamp stack and a mysql that sits on each server.
  7. Yes a bigint is going to be slower because it's 8 bytes vs 4. More data = larger files and larger indexes = slower. Facebook and sites like it use a variety of techniques including sharding, distrubuted data caching, and the use of guids for keys and are basically required to have different architectures than the average site. Sites like that do not use auto_increment. Going back to the OP's question, it is unlikely that he will have even a billion rows. Once you get into datasets with rows numbering in the 100's of millions you start to see significant hardware related performance issues. Usually those companies are successful enough that they can hire people and buy hardware to address those issues, but trying to design for exceptions is a huge waste of time unless you have a reasonable expectation in advance that you will be needing that type of architecture.
  8. rbrown, You are basing your reply on the same misunderstanding that many people seem to have. This is a developer community, not a community to help people locate third party scripts. Hotscripts.com and scores of others make that their business. You seem to have some pretty specific requirements. If you have something that does 90% of what you need, I stand by my previous statement that it sounds like something you might be able to modify to get your last 10%.
  9. Yes. Is this dreamhost? For people who strongly want this feature that could be a selling point. Are you sure you have shared hosting and not vps or dedicated?
  10. What does showing the mysql command line client help prove? Of course the command line client has the ability to connect to other servers built in. That doesn't mean that you can be on your local linux box and connect to the instance of mysql on a shared host. Usually when people request this it is not to use the mysql command line client, but rather to use a gui tool like sqlyog or mysql's tool. The mysql well known port is 3306. Very few shared hosting companies want to leave this open as it invites hacking attempts. The user credentials also need to specify the host. Most panels constrain the user to 'username@localhost'. In order to allow a connection from other hosts, that needs to be changed to either a wildcard or an ip or ip with wildcard, which is also a gaping invitation for exploiters. For this reason very few shared hosts do it. If in fact you have been able to connect from a different machine to your shared host, that is unusual, but I'm not sure for the reasons I stated, it actually indicates that they are "awesome".
  11. There is no way to do interactivity of any sort with just html. That is why people use either flash or javascript. Jquery works perfectly with IE. As I said before it is extensively used by many big websites. Here's a graph that shows that in the top 10k most visited websites, it's been detected 45% of the time. http://trends.builtwith.com/javascript/JQuery
  12. Sure does And on that note, has anyone tried Hype yet? I've been thinking about buying it but don't know if I want to spend $30. Worth it? http://tumultco.com/hype/ Hadn't hear of it but it looks cool.
  13. Yes jquery is an amazing library that greatly simplifies dhtml and ajax, not to mention has been meticulously designed and tested to be cross browser compatible.
  14. eMonk, read this: http://www.flingbits.com/article/view/my-script-with-mysql-calls-doesn-t-work-why-1
  15. You can use wordpress. I brought up Joomla because the effort there would be less about adding a bunch of modules to wordpress to make it work like joomla, but in either case you can get what you want. The reaility is that each of those packages have communities where you will probably get much better help with this than you will get here. Wordpress forums -> http://wordpress.org/support/ Joomla forums -> http://forum.joomla.org/ I'd recommend you join each and do some searching and reading through their forums. The site has a public copy of base joomla you can play around with to get a sense for how it works: http://php.opensourcecms.com/scripts/details.php?scriptid=39&name=Joomla
  16. There are lots of forums that cover a lot of different programming languages. Check out Daniweb, DevShed, Programmer's Heaven, CodeCall... and that's just the tip of the iceberg. Then there's stackoverflow. Even though you're 13 I see no reason to sugarcoat it for you. If you want to do things just to learn about them, then making mistakes is part of the process, and a good thing. With that said I think your time would be better spent figuring out how to do a site that appeals to people in your general age group.
  17. In a nutshell what you're doing is a bad idea. You have one query you are paginating and an entirely different query you use to create the page numbers.
  18. Did you do what I instructed you to do?
  19. It looks to me like the code assumes that there will be one link per file.
  20. I just told you what to do. If you're not going to follow my instructions you're on your own. I never said to just go install easyphp again, and you were also told not to install mysql seperately since easyphp comes with mysql bundled.
  21. Well, that is unfortunate. My guess is that it is a windows specific issue possibly calling libraries that are not thread safe under windows. You could try the old expat libary to see if that works better under windows. http://php.net/manual/en/book.xml.php
  22. NULL is the absence of value. It is not recommended because it often does not work the way people expect it to, however you can allow a column to be null when you define it and if you do not supply a value the column will be null which is exactly what you have. DATE columns in mysql use numbers internally and 00-00-0000 is not a valid date in the range of possible dates for a mysql DATE column. You did not say where you are seeing the zeros date, but the display of a date is entirely up to the developer. Dates can be formatted in just about any way you want. It's up to the developer to do the formatting either using mysql functions to format it in the query or with procedural code.
  23. Knowing cssfreakie I'm quite sure that he considers you to be like "Daniel-San" in the Karate kid, where he goes to the competition and Miyagi tells them "he has a black belt".
  24. I don't know that ajax is awesome but it certainly changed the direction of web development when it emerged. Ironically it was one of the much maligned microsoft additions to IE that eventually sort of took over. If not for ajax, everyone would probably be using flash now, so it's good that there is an alternative to that.
×
×
  • 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.