
rahulephp
Members-
Posts
35 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
rahulephp's Achievements

Member (2/5)
0
Reputation
-
From last few days I am struggling to achieve this. For some reason, we need to change the Foreground (display) color of animated gif images without losing their animation. I am sure there should be some ways to do thing but i couldn't able to find that. A website ajaxload[dot]info is doing approximately same thing but I am not sure how they got this using PHP. Can anyone suggest the similar kind of PHP script to change the color of gif images?? Thanks in advance
-
Hello, I found Google Transliteration, a very good tool to reproduce the sounds of a sentence in a different language. Reference: http://code.google.com/apis/language/transliterate/v1/multilangtransliteration.html http://www.google.com/transliterate/ It supports approx. 22 languages. Can anybody please let us know how does make it to support German and Swedish too. I cant see these languages there. Highly appreciated if you could give an example or reference URL. Thanks in advance.
-
How to speed up the Group By Clause for a large 3GB database.
rahulephp posted a topic in MySQL Help
How to speed up the Group By Clause for a large 3GB database. I am using Group by clause for a large database having 148 columns and 5 million rows with approx 3GB of size. We need to apply the Group by clause on approx 1,00,000 rows at a time without using LIMIT. We can’t use LIMIT as we need all of the entries from a category to be show in the filters section. We have a Dedicated Linux server with 4GB RAM and latest Configuration with 2 processors. I tried all different my.cnf configuration settings to optimize the mysql speed but nothing works. Here is Query that I am using to fetch the data: SELECT e.product_id, e.name, e.description, e.manufacturer, e.imageurl, e.warranty, e.colour, e.collection, e.saleprice, e.price, e.ages, e.size, e.size_h, e.size_w, e.size_d, e.size_unit, e.wifi_ready, e.bundled_deals_packages, e.service_provider, e.how_many_seats, e.characters, e.publishercategory, e.clean_modelno MAX(price) as max_price, MIN(price) as min_price, count(distinct(advertiserid)) as total FROM elec_products as e WHERE status = 1 AND (subcategory2 = 3115) GROUP BY clean_modelno, publishercategory ORDER BY total DESC I have index on following columns product_id PRIMARY KEY Group_by(clean_modelno, publishercategory) BTREE subcategory1 BTREE subcategory2 BTREE subcategory3 BTREE subcategory4 BTREE subcategory5 BTREE status BTREE Table Type is "MyISAM". All major My.cnf configurations: skip-locking key_buffer_size = 512M max_allowed_packet = 128M table_open_cache = 512 sort_buffer_size = 128M read_buffer_size = 128M read_rnd_buffer_size = 128M myisam_sort_buffer_size = 128M thread_cache_size = 8 query_cache_size = 128M max_heap_table_size=256M tmp_table_size=256M join_buffer_size = 2M I can see lots of other similar Price Comparison website which has excellent pageload speed. Please help me out from this and let me know if I am missing anything. -
Here is server specs with some modifications. http://order.1and1.com/xml/order/VirtualServerXL
-
Hi all, First of all I am new with server using. Below my virtual private server details: Processor : 2.8 GHz Dual Core Processor Cores: 2 RAM Memory : 4GB Apache Version: Apache/2.2.3 (CentOS) PHP Version 5.1.6 MySQL Version: 5.0.77 HDD: 100GB Bandwidth: Unlimited Due to 3GB of database size, server may not respond some times and working very slow even if good server configuration. Website is running good on our local computers. I think, I need to change the mysql configuration settings for online server. Please help me out to set the best configuration of my.cnf for above server specially following settings: (Table type is MyISAM) connect_timeout = 20 key_buffer_size = 64M max_allowed_packet = 2G table_cache = 100M wait_timeout= 360 interactive_timeout = 360 key_buffer = 16M sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M Thanks in advance
-
I have a table with 4 columns Table name = products Column name = product_id, product_programname, product_title, model_number When I use GROUP BY with model_number, it alway returns me the info of product (ebay) which comes first in the queue. But i want to get the title from ' argos ' if not null else ' buy ' if not null etc. The below query doesn't works for me. SELECT *, ( case(true) WHEN product_programname = 'argos' AND product_programname IS NOT NULL THEN product_title WHEN product_programname = 'buy' AND product_programname IS NOT NULL THEN product_title WHEN product_programname = 'amazon' AND product_programname IS NOT NULL THEN product_title WHEN product_programname = 'ebay' AND product_programname IS NOT NULL THEN product_title WHEN product_programname = 'next' AND product_programname IS NOT NULL THEN product_title END ) as final_title FROM products GROUP BY model_number Please assist how come it'll be possible.
-
MYSQL - How to use UPDATE with IF-ELSE condition
rahulephp replied to rahulephp's topic in MySQL Help
Thats great. Thanks a lot. -
How to fetch the "name" FROM programname = "Buy" and description which has maximum words using GROUP BY?? I have 6 columns with thousands of product entries: Table name : eproducts Columns : product_id, programname, name, description, clean_modelno Ex. Products Entries: product_id : 5001 programname : argos name : Toshiba 32RV753B description : By Toshiba (100 words) model_number : 32RV753B price : 549.99 product_id : 5002 programname : Buy name : Toshiba 32 Inch Full HD 1080p Freeview HD LCD TV description : Television picture quality: Freeview HD digital (Approx 110 words) model_number : 32RV753B price : 499 product_id : 5003 programname : Amazon name : Toshiba 32 Inch Widescreen Full HD 1080p LCD TV desciption : 66cm Visible LCD HD Ready Integrated Digital (Approx 90 words) model_number : 32RV753B price : 650 product_id : 5004 programname : Ebey name : 2RV753B 32Inch HD Ready 1080p LC HD Read description : Toshiba 32RV753 / 32RV753B 32" REGZA RV Serie (Approx 97 words) model_number : 32RV753B price : 550 When I Group by the products using there model numbers, it gave me the first row as output as all these four products has same model number: SELECT *, MAX(price) as max_price, MIN(price) as min_price, count(distinct programname) as total_retailers FROM eproducts as e WHERE GROUP BY model_number BUT, I want to get the "name" FROM programname : Buy and description which has maximum words from all four descriptions. Please suggest me a good and efficient solution.
-
I have three columns - id, programname, status I wanted to use UPDATE with IF condition something like this: UPDATE elec_products IF(programname ='Argos') ( SET status = 1 ) ELSEIF(programname ='sify') ( SET status = 2 ) ELSE ( SET status = 3 ) ENDIF WHERE programname IS NOT NULL I am not sure if it'll be possible. Please suggest the best possible ways to do this. Thank you
-
On my search result page, I wanted to search for "Nintendo DS Lite - Pink" I used following code: Ex: $search_text = "Nintendo DS Lite Pink"; $kt=split(" ",$search_text);//Breaking the string to array of words // Now let us generate the sql while(list($key,$val)=each($kt)) { if($val<>" " and strlen($val) > 0) { $q .= " name like '%$val%' or "; } }// end of while //Remove the last 'OR' $q=substr($q,0,(strlen($q)-3)); Than the $q would be: SELECT * FROM `products` WHERE name like '%Nintendo%' or name like '%DS%' or name like '%Lite%' or name like '%Pink%' And i am getting Mysql Output given below: 1) Activity Meter - DS. 2) Nintendo DS Red. 3) Nintendo DS Lite Pink. 4) Nintendo DS Lite Turquoise. But the third result is most accurate/relevant then first two result. Please help me out to get the most accurate row first then the relevant rows as per their relevancy with search term "$search_text" Many Thanks in Advance.
-
Yes, actually i wanted too use the same kind of switch statement somewhere in my website but cant be able to post the actual code as it has 100+ lines. Thats why i wrote here a simple and same kind of code.
-
In below switch statement, it should have to print only "T","E","S" characters as string "testing" contains these words. But it is printing all characters including "X" and "Z". I can’t use "break;" because it will break operation after first case. (After matching "T" with word "testing") but I want to continue the operation even after every case to find the next character. Please advice if anything is missing. switch(true) { case stristr('testing','t'): echo "T"."<br>"; case stristr('testing','x'): echo "X"."<br>"; case stristr('testing','e'): echo "E"."<br>"; case stristr('testing','z'): echo "Z"."<br>"; case stristr('testing','s'): echo "S"."<br>"; }
-
I am a php programmer but I am not so good with XML files. For a price comparison website, I need to parse the Amazons XML feed to store product data into the database. Can anyone please help me to find out such a simple script to parse Amazon XML product feed??? (Actually, I need each product data in array to be stored into the database) Thank you in advance.
-
Yeah.. i am thankful to you for this
-
Thank you buddy, I got the solutions. Here it is: UPDATE related_category INNER JOIN product_category ON related_category.rel_cat_id = product_category.cat_id SET related_category.rel_cat_name = product_category.cat_name