Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. Get all the rows and add them to an array. $categories = array(); while ($category = mysql_fetch_array($result)) { $categories[] = $category; } // get first row: echo $categories[0]; // other rows $row = 0; foreach ($categories as $category) { if ($row > 0) echo $category; $row++; }
  2. Interesting problem. You are probably going to need to roll your own modification to library you are using, but this might help you: http://mierendo.com/software/antialiased_arcs/
  3. Did you try what xyph suggested. Being a noobie does not excuse one from actually doing some reading and learning. There is nothing more basic than output... print_r, echo, var_dump, die. You need to read about these in the php manual, not to mention the functions in the code you are using.
  4. http://colorschemedesigner.com/
  5. Give it a password and if you really want to set a null password you can do it later, although it's a very bad idea to have a passwordless root account.
  6. That code snippet does not output anything via var_dump() or echo.
  7. Javascript is javascript. There are very few situations where you have to put the code in the head section, and in fact it is not recommended that you do so because of the way browsers parse .js files. Try putting the scripts where you are able in the body and preferably at the very bottom of the footer. I have to point out the obvious here --- without specific scripts and examples we can do nothing to help you. Try it and come back with specific issues only.
  8. I'm assuming this is ms sql server? You need to use the mssql extension.
  9. while( $ratesinfo = mysql_fetch_array($ratestwo, MYSQL_ASSOC) ) { echo $ratesinfo['ratename'].": ".date("d M Y", myDateTophp($ratesinfo['datefrom']))." - ".date("d M Y", myDateTophp($ratesinfo['dateto']))." "; echo "Rates: ".($ratesinfo['single'] > 0 ? "Single R".$ratesinfo['single']." || " : "").($ratesinfo['double'] > 0 ? "Double R".$ratesinfo['double']." || " : "").($ratesinfo['child'] > 0 ? "Child R".$ratesinfo['child']." || " : "").($ratesinfo['infant'] > 0 ? "Infant R".$ratesinfo['infant']." || " : "").($ratesinfo['base'] > 0 ? "Base Rate Per Unit R".$ratesinfo['base']." || " : "")." "; } Your description is not at all clear. Seems to me that code looks like it will display 2 rate lines. What specifically about what it does now, does not work the way you want it to? Provide example output and perhaps a mockup of what you expect. Here is where your code fetches each row in a loop and displays them. We're not here to do free programming for you, we help advise and mentor people who want to learn about web development.
  10. Yes but 99% of websites these days don't work without javascript either. jquery is a javascript library that is designed to be cross-browser compatible and makes a lot of complicated things easy. It is the most heavily used javascript library on the internet, employed by nearly every major website. Here is one quick implementation based on jquery that I found: http://www.jugbit.com/jquery-vticker-vertical-news-ticker/ There are probably many others, so try some google queries and look around if there are things about the one i provided that don't fit your needs. It looks fine to me however.
  11. I looked at the error again and I think i see the problem: Cause: SQLException: Table 'mysql.servers' doesn't exist So apparently the morons at godaddy make a table named servers in the mysql database. The mysql database is mysql's original data dictionary database and is intended solely for the use of mysql. When you upgraded it wiped the contents of the mysql database and recreated it, and their "servers" table got deleted. This is probably something that gets created when the turbopanel crap is installed on a server, so you might be able to figure out where that script exists and run it again manually. I don't recommend things like this on your production server without a backup or a really good understanding of what they have. One thing you can do on an individual package to see what its contents are is to run: rpm -qil package You will get this type of information: [david@penny ~]$ rpm -qil pcre Name : pcre Relocations: /usr Version : 6.6 Vendor: CentOS Release : 2.el5_1.7 Build Date: Thu Nov 29 21:10:29 2007 Install Date: Mon Mar 28 12:10:15 2011 Build Host: builder6 Group : System Environment/Libraries Source RPM: pcre-6.6-2.el5_1.7.src.rpm Size : 223885 License: BSD Signature : DSA/SHA1, Sat Dec 1 17:10:37 2007, Key ID a8a447dce8562897 URL : http://www.pcre.org/ Summary : Perl-compatible regular expression library Description : Perl-compatible regular expression library. PCRE has its own native API, but a set of "wrapper" functions that are based on the POSIX API are also supplied in the library libpcreposix. Note that this just provides a POSIX calling interface to PCRE: the regular expressions themselves still follow Perl syntax and semantics. The header file for the POSIX-style functions is called pcreposix.h. /lib/libpcre.so.0 /lib/libpcre.so.0.0.1 /usr/bin/pcregrep /usr/bin/pcretest /usr/lib/libpcrecpp.so.0 /usr/lib/libpcrecpp.so.0.0.0 /usr/lib/libpcreposix.so.0 /usr/lib/libpcreposix.so.0.0.0 /usr/share/doc/pcre-6.6 /usr/share/doc/pcre-6.6/AUTHORS /usr/share/doc/pcre-6.6/LICENCE /usr/share/man/man1/pcregrep.1.gz /usr/share/man/man1/pcretest.1.gz To find the package a particular file on the fs belongs to you can do this: [david@penny ~]$ rpm -qif /usr/bin/pcregrep Name : pcre Relocations: /usr Version : 6.6 Vendor: CentOS Release : 2.el5_1.7 Build Date: Thu Nov 29 21:11:05 2007 Install Date: Mon May 12 17:51:10 2008 Build Host: builder6 Group : System Environment/Libraries Source RPM: pcre-6.6-2.el5_1.7.src.rpm Size : 232621 License: BSD Signature : DSA/SHA1, Sat Dec 1 17:10:37 2007, Key ID a8a447dce8562897 URL : http://www.pcre.org/ Summary : Perl-compatible regular expression library Description : Perl-compatible regular expression library. PCRE has its own native API, but a set of "wrapper" functions that are based on the POSIX API are also supplied in the library libpcreposix. Note that this just provides a POSIX calling interface to PCRE: the regular expressions themselves still follow Perl syntax and semantics. The header file for the POSIX-style functions is called pcreposix.h. I would suggest going back to the forums with the specific information and question I provided and ask them how you can just reinstall the tables they add to the database. Of course the best answer is that you should have had a mysql backup (maybe you do) before you started messing with any of this, and if so you could just find the backup portion of that table and reload that table. Here's the tables that come with mysql in its mysql database in version 5.0x to give you an idea: Database changed mysql> show tables; +---------------------------+ | Tables_in_mysql | +---------------------------+ | columns_priv | | db | | func | | help_category | | help_keyword | | help_relation | | help_topic | | host | | proc | | procs_priv | | tables_priv | | time_zone | | time_zone_leap_second | | time_zone_name | | time_zone_transition | | time_zone_transition_type | | user | +---------------------------+ 17 rows in set (0.00 sec) If you have problems with godaddy, a little righteous indignation as to why they would install tables into the mysql data dictionary might not hurt your cause.
  12. If you can do something in SQL rather than having to drop to procedural it is certainly easier than writing a procedural program, and in most cases it is also faster. The only time that is not true in my experience is when you need to transform mass amounts of data, and the cost of SQL transactions around batch updates slows things down to an unacceptable level. Those circumstances tend to be few and far between outside data warehousing and the need to bulk load lots of data.
  13. Is that some sort of script? Where is that error coming from? Often there are multiple installations of apache/php and the main trick is finding out what you have where. When you did this upgrade how did you do it? Yum? Did you do a rpm -qa? What packages are installed?
  14. That type of thing can be done easily using jQuery.
  15. My opinion is that color schemes are fairly subjective. I don't have a problem with the current scheme. So long as the colors fit within color theory, and are used consistently, there's no major concern there. I did notice the logo. The bars bothered me less than the fact that it's non-descript. With that said, I bet if you put a little roof on it, it actually looks a lot better, but I think you'd be better overall with something that better represents London like a Big Ben logo or London bridge or something else that would speak to American perception of London.
  16. So you have a site that is basically trying to do exactly what 100 other sites already do far better than yours ever will? There is nothing unique or impressive about your site. There is no reason why people would come to it. I don't see any point in providing you feedback, you are wasting your time.
  17. I think that's one opinion, but I see no problem with an ajax chat system.
  18. The design is solid. Usability could use some upgraded functionality. I would like to see more information about the rentals on their specific listing. For example, it would be helpful if there were reviews and a map of the location or general location Complaints: -Your reviews are really testimonials, but the menu lists it as reviews which is misleading. With that said, you're missing a marketing opportunity by not have a testimonial or 2 on the homepage in a block. -It would be a more functional site if you had actual reviews attached to the individual listings when people are commenting on the listings. Having that user feedback loop is important. -You basically have no sortation or filtering capability. -The request availability is a huge barrier to entry. In today's world I really think you need to figure out how to have something more immediate, or at very least a calender of availability. The more information you request the less likely you will have someone actually fill out a form.
  19. You have 49 posts here and you still don't know how to use either the code or php bbcode blocks around your code?
  20. Sorry I don't believe you. You ran your algorithm 100k times and it ran in 1 second? I'd like to see some proof of that.
  21. For starters have a SQL statement that's valid. You are passing $data in for some reason --- shouldn't you actually try and use it in your Insert query?
  22. Maybe it's because you are generating 100000 15 character strings (using some algorithm you didn't include) and checking that there are no duplicates.
  23. Something is wrong because the site is still generating a 301 for https://www.wiki-pet.com/ads/login/test-ad-1.1.jpg
×
×
  • 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.