Re: [PHP] MySQL Query Puzzle

2010-07-18 Thread Shafiq Rehman
the following query: INSERT IGNORE INTO NEW_TABLE (column1, column2) SELECT column1, column2 FROM OLD_TABLE This will give you distinct rows as required. -- Keep Smiling :-) Shafiq Rehman Blog: http://shafiq.pk, Twitter: http://twitter.com/shafiq -- PHP General Mailing List (http://www.php.net

Re: [PHP] PHP CURL

2007-11-20 Thread Shafiq Rehman
Hi Fahad, May be you wil find something helpful at http://curl.haxx.se/mail/archive-2003-03/0137.html -- Keep Smiling Shafiq Rehman (ZCE) http://www.phpgurru.com | http://shafiq.pk Cell: +92 300 423 9385 On Nov 19, 2007 11:45 AM, Fahad Pervaiz [EMAIL PROTECTED] wrote: I am looking forward

Re: [PHP] what is better way to write the query

2007-11-05 Thread Shafiq Rehman
Hi, If possible, write your inserts queries in a text file and use LOAD DATA for bulk inserts. -- Keep Smiling Shafiq Rehman (ZCE) http://www.phpgurru.com | http://shafiq.pk Cell: +92 300 423 9385 On 11/2/07, Andrew Ballard [EMAIL PROTECTED] wrote: On Nov 2, 2007 10:41 AM, afan pasalic

Re: [PHP] Another simple question (Probably)

2007-07-09 Thread Shafiq Rehman
Hi, correct syntax for mktime is mktime( int hour, int minute, int second, int month, int day, int year) -- Shafiq Rehman (ZCE) http://www.phpgurru.com | http://shafiq.pk Cell: +92 300 423 9385 On 7/9/07, Jason Pruim [EMAIL PROTECTED] wrote: Okay so given this section of code: $taskTime

Re: [PHP] Date

2007-06-19 Thread Shafiq Rehman
Hello, There's another way out there using mysql SELECT DATE_ADD('$expiry_date', INTERVAL 7 DAY) as fDate but off course not a recommended way. In fact you can use it update query (update tbl_name set expiry_date = date_add('$expiry_date', INTERVAL 7 DAY) where user ='$user') -- Shafiq Rehman

Re: [PHP] Date

2007-06-19 Thread Shafiq Rehman
On 6/19/07, Richard Heyes [EMAIL PROTECTED] wrote: Shafiq Rehman wrote: Hello, There's another way out there using mysql SELECT DATE_ADD('$expiry_date', INTERVAL 7 DAY) as fDate but of course not a recommended way. So why suggest it? just to share the knowledge In fact you can use

Re: [PHP] Re: Controlling project version

2007-06-18 Thread Shafiq Rehman
Hello, I use CVS in office and home -- Shafiq Rehman (ZCE) http://www.phpgurru.com | http://shafiq.pk Cell: +92 300 423 9385 On 6/18/07, Jochem Maas [EMAIL PROTECTED] wrote: Colin Guthrie wrote: Stut wrote: I don't like the branching in subversion, it's a lot easier to work with in CVS

Re: [PHP] Re: London PHP salaries

2007-06-14 Thread Shafiq Rehman
Hi, You can get a rough idea from http://www.totaljobs.com/JobSearch/Results.aspx?Keywords=php+mysql -- Shafiq Rehman (ZCE) http://www.phpgurru.com | http://shafiq.pk Cell: +92 300 423 9385 On 6/14/07, Gary Smith [EMAIL PROTECTED] wrote: Joker7 wrote: For living in London you would need

Re: [PHP] linking to an image with document_root

2007-06-01 Thread Shafiq Rehman
Hi, You cannot use document_root to get the paths for images. You can write a function to get the images url in your application. function imageServer() { return /images/; } -- Shafiq Rehman (ZCE) http://www.phpgurru.com | http://shafiq.pk Cell: +92 300 423 9385 On 6/1/07, Chris [EMAIL

Re: [PHP] Mail function

2007-04-05 Thread Shafiq Rehman
($toEmail, $subject, $message, $fromName, $fromEmail); ? -- Shafiq Rehman (ZCE) http://www.phpgurru.com | http://shafiq.pk On 4/5/07, Zhimmy Kanata [EMAIL PROTECTED] wrote: Hi, I am working on a program to create a registration feature through a email notificaiton much like this list

Re: [PHP] image uploading/resizing best practices in PHP

2007-03-22 Thread Shafiq Rehman
Option one is much better. -- Shafiq Rehman (ZCE) http://phpgurru.com | http://shafiq.pk On 3/22/07, Tijnema ! [EMAIL PROTECTED] wrote: On 3/22/07, Dwayne Heronimo [EMAIL PROTECTED] wrote: Dear All, I would like to make a script to upload a jpg filewith php to a server; then make a thumb

Re: [PHP] Password Protecting

2007-03-21 Thread Shafiq Rehman
of you can help! Thanks in advanced!!! Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Shafiq Rehman (ZCE) http://phpgurru.com | http://shafiq.pk

Re: [PHP] Flash animation without install Flash!

2007-03-21 Thread Shafiq Rehman
Impossible with flash... You can add GIF for tiny animations. -- Shafiq Rehman (ZCE) http://phpgurru.com | http://shafiq.pk On 3/21/07, Helder Lopes [EMAIL PROTECTED] wrote: Hi people, Because the problems with virus in internet the people dont install activex controls. My question is: How

Re: [PHP] Name Capitalization

2007-03-21 Thread Shafiq Rehman
Hi, Some problems are universal and we cannot fix them in computer science. I think it's better to educate/guide your visitors about such names that they write in correct capitalization Regards -- Shafiq Rehman (ZCE) http://phpgurru.com | http://shafiq.pk On 3/21/07, Tijnema ! [EMAIL PROTECTED

Re: [PHP] read only texbox to html with php

2007-03-21 Thread Shafiq Rehman
Please elaborate the question -- Shafiq Rehman (ZCE) http://phpgurru.com | http://shafiq.pk On 3/21/07, Ross [EMAIL PROTECTED] wrote: I have a readonly textbox that gets mailed as a newsletter. The text is a standard covering letter. The problem is when I try and convert it to html it doesn't

Re: [PHP] php bar/graph scripts/library

2007-03-16 Thread Shafiq Rehman
Hello, You can create graphs with Flash. Here is the link http://www.maani.us/charts/index.php Alternately you can also use JPGraph: http://www.aditus.nu/jpgraph/ -- Shafiq Rehman (ZCE) http://phpgurru.com | http://shafiq.pk On 3/16/07, Tijnema ! [EMAIL PROTECTED] wrote: On 3/16/07, Ron

Re: [PHP] Re: Posting variable outside of the post form

2007-03-13 Thread Shafiq Rehman
Hello, Use session variables -- Shafiq Rehman (ZCE) http://phpgurru.com | http://shafiq.pk On 3/13/07, Haydar Tuna [EMAIL PROTECTED] wrote: Hello, If your variable is not most important for your application security, you should use HTML hidden form field but If your variable is most

Re: [PHP] Re: remote file time -small issue

2007-02-22 Thread Shafiq Rehman
Hi, Alternatively you can use CURL to get last modification time. study the CURLOPT_HEADERFUNCTION constant for more details. -- Shafiq Rehman (ZCE) http://www.phpgurru.com, http://shafiq.pk On 2/22/07, David Robley [EMAIL PROTECTED] wrote: SJAMHO DBMS wrote: Dear Sirs, I have

Re: [PHP] Temporary Emails - Your Recommendations - An Appeal to the PHP Community

2007-01-03 Thread Shafiq Rehman
of any web application bcoz usualy we do not allow users to create more than one account with the same email address ;) -- Shafiq Rehman Zend Certified Engineer http://phpgurru.com, http://shafiq.pk On 1/3/07, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, January 1, 2007 4:26 am, Jason

Re: [PHP] PAYPAL TRANSACTION.

2006-08-04 Thread Shafiq Rehman
: http://www.php.net/unsub.php Hi, You can find PHP code examples for paypal integration at https://www.paypal.com/cgi-bin/webscr?cmd=p/pdn/software_dev_kit_php-outside -- Shafiq Rehman Sr. Web Engineer http://www.phpgurru.com

Re: [PHP] Searching and storing results index in cookies or session variables

2006-07-13 Thread Shafiq Rehman
- getCache($id) This function will checks the validity of cache and return false or unserialized record set from cache This mechanism will save your lot of MySQL queries in searching becoz you are not querying every time. If your data is static you can increase the $ttl accordingly. -- Shafiq

Re: [PHP] RE: [PHP-WIN] Dynamic HTML table sort with PHP

2006-07-09 Thread Shafiq Rehman
://pkfinance.info/analysis/ Hope this will help! Regards Shafiq Rehman Sr. Web Engineer http://www.phpgurru.com

Re: [PHP] Shopping Carts

2006-07-09 Thread Shafiq Rehman
will be issued with a License Key I used it two years back and it works excellent Shafiq Rehman Sr. Web Engineer http://www.phpgurru.com

Re: [PHP] Re: Setting cookie for two domains.

2006-01-05 Thread Shafiq Rehman
Hello Guys, Thanx a lot for sharing some really great ideas. especial Mark and Albert has suggested some great stuff to do. Thanx a lot. -- *** phpgurru.com [A php resource provider] *** \\\|/// \\ - - // ( @ @ ) PHP is too logical for my brain

Re: [PHP] help register domain name

2006-01-05 Thread Shafiq Rehman
This person should be awarded with some great prize :) Great topic. On 1/5/06, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] hi, i want to register a domain name through NetworkSolutions.com, but it require a credit card which i dont have to pay the bill. if you have a credit card, i

[PHP] Setting cookie for two domains.

2006-01-04 Thread Shafiq Rehman
Hi, How can I register a session or cookie for two domains. I want to maintain logged user's state when he goes from one domain to other domain. Example Suppose a user is logged in on domain1.com. A cookie is set and user is authenticated from database on the basis of that cookie. When he goes

Re: [PHP] Output of html without using functions?

2005-09-14 Thread Shafiq Rehman
Hi, You can use your code1.php as ?php return rand(1,1); ? and then you can get the value as $returnedData = require(code1.php); On 9/14/05, Gustav Wiberg [EMAIL PROTECTED] wrote: Hi there! Look at the following code code1.php ?php echo rand(1,1); ? code2.php

Re: [PHP] Re: Parsing MS-WORD docs

2005-09-08 Thread Shafiq Rehman
:39 am, Shafiq Rehman wrote: Hello, I want to parse the .doc files with PHP. Anybody have some idea regarding this problem. Your help regarding this matter is really appreciated Also consider antiword And also: wvWare: http://wvware.sourceforge.net/ Word2x: http

[PHP] Parsing MS-WORD docs

2005-09-07 Thread Shafiq Rehman
Hello, I want to parse the .doc files with PHP. Anybody have some idea regarding this problem. Your help regarding this matter is really appreciated Regards -- PHP is too logical for my brain (http://www.phpgurru.com)

Re: [PHP] how to divide string

2005-09-05 Thread Shafiq Rehman
Hi Zebic It is pretty much simple./ Look into the code $text = abcdefghijklmnopqrstuwvxyz; $newtext = wordwrap($text, 4, br, 1); echo $newtext; // if you want all these chunks in an array use it as $array = explode(br, $newtext); echo $array[0]; echo $array[1]; echo $array[2]; Regards Shafiq

Re: [PHP] displaying certain number of character

2005-08-31 Thread Shafiq Rehman
Hey Philip you can use this function function cuttext($text, $maxChars = 20, $tail = '') { $arrWords = explode( , $text); $temp = ; for ($i=0; $icount($arrWords); $i++) { $temp = ($i == 0 ? $arrWords[$i] : . $arrWords[$i] ); if (strlen($temp) $maxChars) { $returnStr = $temp; } else { return

Re: [PHP] Re: security while building online store

2005-08-31 Thread Shafiq Rehman
You must read the articles by shiflet http://www.phpgurru.com/index.php?acion=pagingchid=www.shiflett.orgoffset=10 On 8/31/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: kat Dzesi momak ;) I think you know PHP enough to make your code secure. Just take care

[PHP] php vulnerability

2005-08-22 Thread Shafiq Rehman
Hi all, My server was hacked last week and the message displayed on home page was spy kidz owns your server. I researched on internet and found that this is some kind of trojan which infects the *.index files. It penetrate from HTTP. Some paople were saying that there is vulnerability in PHP.

Re: [PHP] php vulnerability

2005-08-22 Thread Shafiq Rehman
, Torgny Bjers [EMAIL PROTECTED] wrote: Shafiq Rehman wrote: My server was hacked last week and the message displayed on home page was spy kidz owns your server. I researched on internet and found that this is some kind of trojan which infects the *.index files. It penetrate from HTTP

Re: [PHP] Looking for CMS advice

2005-08-22 Thread Shafiq Rehman
Hey Michael, Visit the site for excellent open source CMS http://www.ez.no Regards -- *** phpgurru.com http://phpgurru.com [A php resource provider] *** \\\|/// \\ - - // ( @ @ ) PHP is too logical for my brain +---oOOo-(_)-oOOo--+ | Mian Shafiq ur

Re: [PHP] Special HTML characters question.

2005-08-22 Thread Shafiq Rehman
Hi, Here are two routines for your problem. function htmlentities2($myHTML) { $translation_table=get_html_translation_table (HTML_ENTITIES,ENT_QUOTES); $translation_table[chr(38)] = ''; return preg_replace(/(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/,amp; , strtr($myHTML, $translation_table)); }