Re: [PHP-DB] csv problem.. read csv from var

2007-02-16 Thread Martin Alterisio
2007/2/16, bedul [EMAIL PROTECTED]: i have problem with reading csv.. for i know the example script i get was BASIC SCRIPT= $handle = fopen(hasillab.csv, r); $data2=$handle; while($data = fgetcsv($handle, 1000, ,)){ foreach($data as $str) $data2.=br=

Re: [PHP-DB] Select distinct field won't return distinct value

2006-06-07 Thread Martin Alterisio
I have a friend called GROUP_CONCAT, he may know what you want but he's only available since MySQL 4.1 2006/6/7, Blanton, Bob [EMAIL PROTECTED]: It is a Sybase vendor function but I was wondering if mysql had something comparable. I don't see anything in the manual. Maybe the subquery is the

Re: [PHP-DB] Sending filing attachments using PHP

2006-05-12 Thread Martin Alterisio
2006/5/12, JupiterHost.Net [EMAIL PROTECTED]: Dwight Altman wrote: Right after rebuilding php and apache and breaking PHP funtionality for everyone, just so you can send a semi complex MIME message? That is the epitome of PHP's lameness and why I can't sit quietly by and not recommend

Re: [PHP-DB] Sending filing attachments using PHP

2006-05-12 Thread Martin Alterisio
2006/5/12, Martin Alterisio [EMAIL PROTECTED]: ... I hate not having a proper application framework, ... Sorry, there is a mistake there. I meant to say that I hate not having an application server, although I also think currently available framework are just not the way to go

Re: [PHP-DB] Sending filing attachments using PHP

2006-05-12 Thread Martin Alterisio
2006/5/12, JupiterHost.Net [EMAIL PROTECTED]: It's a fact that I can't deny any of the bad points you have exposed about PHP. I even agree with you that most of this problems are really awful and it's pointless to hide them. But the fact that PHP is by preference the language for

Re: [PHP-DB] preg_replace help!

2006-05-04 Thread Martin Alterisio
2006/5/3, Nathan Heaps [EMAIL PROTECTED]: Ok, scratch that, new problem. what can I replace (.*?) with in order for php to recognise a multi-line quote/bold/italic/code/whatever? By default the . pattern matches anything except a line break you can either use ((?:.|\n)*) or add a modifier to

Re: [PHP-DB] preg_replace help!

2006-05-04 Thread Martin Alterisio
2006/5/4, Martin Alterisio [EMAIL PROTECTED]: 2006/5/3, Nathan Heaps [EMAIL PROTECTED]: Ok, scratch that, new problem. what can I replace (.*?) with in order for php to recognise a multi-line quote/bold/italic/code/whatever? By default the . pattern matches anything except a line break

Re: [PHP-DB] Bad picture colors

2006-04-27 Thread Martin Alterisio
2006/4/27, nikos [EMAIL PROTECTED]: Hello list I use the following code to shrink some photos. $directory='/var/www/html/offroads/tmp/'; $dir=opendir($directory); while($file=readdir($dir)) { $dirfile=$directory.$file; if(is_file($dirfile))

Re: [PHP-DB] Single quotes in INSERT statements?

2006-04-26 Thread Martin Alterisio
2006/4/26, [EMAIL PROTECTED] [EMAIL PROTECTED]: Skip Evans wrote: Hello all, I'm brand spanking new to the list and have a quick question. I was under the impression that addslashes() would handle single quote marks in INSERT statements, but when I execute the following:

Re: [PHP-DB] Single quotes in INSERT statements?

2006-04-25 Thread Martin Alterisio
1) Check that the string is not being truncated because of the column length 2) If you're seeing this data being truncated in the html output of your site, check if it isn't being caused by outputing the data without properly encoding special html characters. 3) . dunno 2006/4/25, Skip

Re: [PHP-DB] Single quotes in INSERT statements?

2006-04-25 Thread Martin Alterisio
2006/4/25, Skip Evans [EMAIL PROTECTED]: Martin Alterisio wrote: 1) Check that the string is not being truncated because of the column length This was not it. I was sure it wasn't but the first rule of debugging says never discard a possible cause, no mather how dumb it may seem 2