Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. I don't see anything obvious, but the obvious question is -- does the INSERT statement match the Member.password column definition, and does that definition use the same technique you're using in your comparison. In particular, you're using the mysql md5() function which produces a 32 character string. Is the password column a CHAR[32]? I also don't see why you would want to do 2 queries (check for username, then password) when you could simply check for username AND password, which is more efficient and just as safe.
  2. I don't have time to spoonfeed out all the code, but the simple answer from the SQL side, is that you can count(DISTINCT user_id). The rest of that is simply constructing the criteria with the appropriate AND and OR's needed.
  3. It's not hard at all, the article lays out a prescription and example for how to build those types of menus in your .css stylesheet. Not sure what your question is. You need to understand the basics of cascading style sheets if you're going to understand what's being done there, but otherwise it's not really too complicated.
  4. At the end of the day, they are one in the same. There are different algorithms for taking a large image and shrinking it. The result is highly dependent on the nature of the original. Photoshop provides "resampling" with several different algorithms available when you want to increase or decrease the size of an image. For photos (bitmap) images, the standard technique used in photoshop is called "bicubic" which implements a complex sampling algorithm, however, you can dumb it down to the types of techniques used by browsers, via the "nearest neighbor" or "bilinear" algorithms which basically just look at neighboring pixels. Chances are the browsers are simply implementing a nearest neighbor algorithm which is why the downsampled images look bad.
  5. This is called a "diff". There's no php built-in, but there is a PEAR package named text_diff as well as other packages based on it, you can find out there.
  6. I don't see how you fixed anything. You need to make sure that when you do if - else that you end the block. if () { } else { } You can't have: if () { } else { } else { You can have elseif or else if (). http://www.php.net/elseif
  7. You're missing end block statements on at least one of your else statements around that location.
  8. A "notice" is just that -- it's something that you may or may not need to be aware of. It's not an error. That particular notice is telling you that you are trying to reference an array location in the $_GET variable that doesn't exist. the $_GET[] array contains array elements for an url parameters that were passed along when the script was run. Since you're trying to implement a self-posting form using the GET method, this script will always produce that notice when the form is emitted. If you want to avoid that, you can check isset($_GET['code']) prior to attempting to set a variable to it.
  9. Failed how? Did you echo out the result of session_save_path() and verify it's a valid path?
  10. I really can't suggest much more, when I don't understand what the application is.
  11. It's not that hard, look up UNION in the mysql manual.
  12. You're misusing STR_TO_DATE() because your format string doesn't match the string you're passing, but as I already explained you can use string constants as I showed in my previous email.
  13. Mirroring is often done using rsync.
  14. What are the datatypes of the columns in the booking_resource-booking table. Speaking more generally to do comparison you just specify the date as a string like date_from >= '2010-06-01'.
  15. I'd suggest you union the 2 queries, using your IN list (IN for the ones at the top, NOT IN for the others). In each add a column called sortorder that you set to a constant. For the IN list set it to '0' for the NOT in set it to 1. Then you can ORDER BY this column and all the IN's will be at the top.
  16. You didn't look at my pattern carefully. What you're talking about is the default of greedy. To make the match non-greedy I added the '?' to the match all characters -> '.*?'
  17. Taking you at your word, if I was going to construct this regex I would use something like: $pattern = '/(\'|")(.*?)(\1)/s'; Not sure why you are trying to match things that aren't the backreference when you will already use the backreference to delimit your match.
  18. One suggestion would be to build upon http://phpgacl.sourceforge.net/ for your security checks. Most people use php sessions. There are many libraries that can help. I'd suggest you might take a look at the Zend Framework for a start: http://framework.zend.com/manual/en/zend.session.html Using it will hide a lot of the complexity and allow you to focus on integrating that code into your application.
  19. Somehow you have to get the package file. Yum allows automatic retrieval of .rpm files from one or more repositories, but you can also grab the .rpm files manually and install them with yum or rpm. However, I don't see how you can get them if you don't have internet access.
  20. 127.0.0.1 is mapped to localhost, so you should be able to use http://localhost/phpmyadmin I can't think of any reason why it would work for 127.0.1.1 and not 127.0.0.1.
  21. Did you try http://127.0.0.1/phpmyadmin or http://127.0.0.1/phpmyadmin/?
  22. You're using the wpdb->prepare() method, that expects sprintf style substitution strings. Considering what you're trying to do, you might have better luck using $wpdb->query()
  23. Have you read about the SQL "join"? You should be able to inner join the 3 tables together on the common element and receive a single result set that you can then fetch.
  24. Mysql has an option -- SQL_NO_CACHE that can be used to suppress the mysql query cache. You supply this in the actual select statement: SELECT SQL_NO_CACHE * from table
×
×
  • 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.