Jump to content

roark

Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling
  • Location
    South Africa

roark's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Great! Thanks Ignance and BH, When you looking for solutions knowing the terminology is a vital prerequisite. After knowing to search for "natural sort" I did come across a few solutions i.e. Searching by lengh first then the column value SELECT number FROM tablename ORDER BY LENGTH(name), name Hope this helps someone.
  2. Hi bh, Thanks for your response, I think you may have something there. The prefix unfortunately does change so there are some names that are just 1.jpg, 2.jpg, 10.jpg, 11.jpg etc So the '_' wont be present in all the names. Can you think of any other way to do it? And what is a natural sort? Thank you!
  3. MySQL client version: 5.0.45 Hi Everyone, I have a simple database with the filenames of images in a column called "name" (varchar(100)). sample names: Polmed_3.jpg Polmed_11.jpg Polmed_4.jpg Polmed_1.jpg Polmed_10.jpg I would like to select these filenames and order them by "name" and I'm getting the following result: Polmed_1.jpg Polmed_10.jpg Polmed_11.jpg Polmed_2.jpg Polmed_4.jpg This is correct in a programatic way however I am looking to get the following result: Polmed_1.jpg Polmed_2.jpg Polmed_4.jpg Polmed_10.jpg Polmed_11.jpg Does anyone know how I would achieve this? Thanks very much!
  4. Hi Guys, Could anyone help me with this problem? I would like to shuffle 2 arrays the same i.e: Before shuffling: array 1: 1, 2, 3, 4, 5 array 2: a, b, c, d, e After shuffling: array 1: 2, 4, 5, 3, 1 array 2: b, d, e, c, a Both arrays index order changed in the same manner. I'm really stumped... Thanks
  5. Hi guys, apache 2.2 winxp pro php5 I'm having trouble with getting mod_rewrite to work on my machine with the above configuration. I'm new to mod_rewrite. If I run phpinfo(); it tells me I have succesfully loaded mod_rewrite. however I cannot get any mod_rewrite rule to work. here are the parts of httpd.conf I have changed: [pre] LoadModule rewrite_module modules/mod_rewrite.so DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" <Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Deny from all Satisfy all </Directory> [/pre] And I am trying to use a .htaccess file with the following in it: [pre] Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^wacko\.html$ index.html [L] [/pre] (so when I browse http://localhost/wacko.html it should redirect me to http://localhost/index.html) This is not working, nor any mod_rewrite I try. I'm sure it must be something with the httpd.conf file but I have tried for days with no success, any hel would be greatly appreciated Thank you! Roark
×
×
  • 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.