[PHP] FULLTEXT: It worked?? Why?

2002-11-24 Thread John Taylor-Johnston
MySQL4.0.1 Question. HTOK FULLTEXT index confusion. Why does my SQL work? SELECT YR,AU,ST,SD,SC,BT,BD,BC,AT,AD,AC,AUS FROM ccl_main WHERE MATCH (AUS) AGAINST ('+margaret +atwood' IN BOOLEAN MODE) ORDER BY id desc AUS is not part of my FULLTEXT Index. So why does it work? How does FULLTEXT work

Re: [PHP] FULLTEXT: It worked?? Why?

2002-11-24 Thread John Taylor-Johnston
gt; www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > Passionate hatred can give meaning and purpose to an empty life. > -- Eric Hoffer > */ -- John Taylo

[PHP] Can't get this right

2002-12-02 Thread John Taylor-Johnston
What am I supposed to be doing with my slashes, exactly? Here is my first post: http://news.php.net/article.php?group=php.general&article=126754 I can't get this right. I know I have to esacpe my quotes for my SQL to work. http://news.php.net/article.php?group=php.general&article=126755 PHP add

[PHP] Whimper, help :)

2002-12-03 Thread John Taylor-Johnston
Martin, Anyone, I'm desperate :( PHP isn't sending my SQL correctly. It's not a MySQL problem. It's my PHP syntax. Debugging: http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B $sql = 'SELECT ... FROM '.$table.' WHERE MATCH ... AGAINST (\'"ready maria"\' IN BOOLEA

Re: [PHP] Whimper, help :)

2002-12-03 Thread John Taylor-Johnston
Tom, Anyone, No I'm not looking for a ", I'm trying to pass double quotes into MySQL. Like I said, it works when debugging: http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B http://ccl.flsh.usherb.ca/print/display.test.inc.phps but fails when I try to pass my doub

Re: [PHP] Whimper, help :)

2002-12-03 Thread John Taylor-Johnston
what are the field types in the mysql DB? > > > -Original Message----- > > From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, 4 December 2002 4:13 PM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] Whimper, help :) > > > >

Re: [PHP] Whimper, help :)

2002-12-03 Thread John Taylor-Johnston
http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B http://ccl.flsh.usherb.ca/print/index.html?search=%26quot%3Bready+maria%26quot%3B I blame PHP. Can't be MySQL. echo $sql displays the EXACT same thing. Debugging ... Works jdaxell.ccl = 2 records found: $sql = 'SELE

Re: [PHP] Whimper, help :)

2002-12-03 Thread John Taylor-Johnston
http://ccl.flsh.usherb.ca/print/print.html?search=%26quot%3Bready+maria%26quot%3B http://ccl.flsh.usherb.ca/print/index.html?search=%26quot%3Bready+maria%26quot%3B I blame PHP. Can't be MySQL. echo $sql displays the EXACT same thing. Debugging ... Works jdaxell.ccl = 2 records found: $sql = 'SELE

[PHP] Sigh :)

2002-12-04 Thread John Taylor-Johnston
Hi, Can someone take a look at this again, please? http://news.php.net/article.php?group=php.general&article=126934 Your posts so far have proven fruitless. Thanks for trying. :) I do appreciate it. I will try to answer everyone at the same time. Someone mentionned it might be a problem with m

[PHP] magic quotes

2002-12-04 Thread John Taylor-Johnston
What are magic quotes? Will this help me? http://news.php.net/article.php?group=php.general&article=126934 How is this different from stripslashes. I have RTF doc :) http://www.php.net/manual/en/function.get-magic-quotes-gpc.php Be gentil ::p -- John Taylor-John

Re: [PHP] Sigh :)

2002-12-04 Thread John Taylor-Johnston
; > The book "ready maria" is great > > Would return something. > > Robbert van Andel > > -Original Message- > From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 04, 2002 9:33 AM > To: [EMAIL PROTECTED] > Subject: [

Re: [PHP] Sigh :)

2002-12-04 Thread John Taylor-Johnston
nter wrote: > Which version of mysql are you using? > > -- > Ray > > On Wed, 2002-12-04 at 10:33, John Taylor-Johnston wrote: > > Hi, > > > > Can someone take a look at this again, please? > > > > http://news.php.net/article.php?group=php.general&a

Tom: [PHP] magic quotes

2002-12-04 Thread John Taylor-Johnston
What are magic quotes? Will this help me? > > JTJ> http://news.php.net/article.php?group=php.general&article=126934 > > JTJ> How is this different from stripslashes. > > JTJ> I have RTF doc :) > > JTJ> htt

[PHP] Humour me

2002-12-06 Thread John Taylor-Johnston
Humour me. New server. I'm a little tired. Where is my php.ini on a red hat server? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Can I check MYSQL version

2002-12-08 Thread John Taylor-Johnston
Hi, Can I check mysql version so if version >= 4 $sql = 'version 4 stuff' else $sql ="version 3 stuff"; -- John Taylor-Johnston - "If it's not open-source, it's Murphy'

Re: [PHP] Can I check MYSQL version

2002-12-08 Thread John Taylor-Johnston
mysql> SELECT VERSION(); -> '3.23.13-log' Ok, how do I PHP it for greater than or equals version 4 :? John Johannes Schlueter wrote: > On Sunday 08 December 2002 20:42, John Taylor-Johnston wrote: > > Hi, > > Can I check mysql version so if versi

[PHP] MySQL: FullText Index

2002-12-09 Thread John Taylor-Johnston
Does anyone know what the limit is for a FULLTEXT Index in MySQL 3.23.49+? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] session_start

2002-12-14 Thread John Taylor-Johnston
I used to think I knew how to do this ... take pity :) I start my session: session_name("TestALS"); session_start(); I register a variable: session_register("studentid"); if (isset($_SESSION["studentid"])) { $id = $_SESSION["studentid"]; echo "\$studentid= $studentid"; } Pretend $studentid con

[PHP] I did: Re: session_start

2002-12-14 Thread John Taylor-Johnston
I did call session_start() before anything is output to the browser. http://www.php.net/manual/en/function.session-start.php I only have one php file so I know I'm recyling my code each time: session_name("TestALS"); session_start(); session_register("studentid"); if (isset($_SESSION["studentid"

[PHP] Session: I RTFM

2002-12-14 Thread John Taylor-Johnston
>Jason wrote: >RTFM again. Jason, again, I RTFM, but did not get it working. Otherwise I wouldn't have dared ask a question. >Sessions depends on a number of factors >including your version of PHP and the setting of register_globals. The FM manual says: "$_SESSION (or $HTTP_SESSION_VARS with PH

[PHP] Re: Session: I RTFM

2002-12-14 Thread John Taylor-Johnston
""; > ?> > > > > > Nextpage > > > > > Is our _SESSION here? > > > KeyValue > while(list($k,$v)=each($_SESSION)){ > echo > "".stripslashes($k)."".stripslashes($v).""; > } > ?> > >

Re: [PHP] Session: I RTFM

2002-12-14 Thread John Taylor-Johnston
------

[PHP] needle in a haystack (Can't find :)

2002-12-16 Thread John Taylor-Johnston
http://www.php.net/manual/en/function.in-array.php Can't find the °ù¢# $needle in my $haystack. Why? :p (It is a serious example :) http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [php] INSERT INTO

2002-12-16 Thread John Taylor-Johnston
Yes I'm reading the FM :) http://www.php.net/manual/en/ref.mysql.php I should know this. How will I PHP this SQL into my MySQL table? INSERT INTO testals VALUES ($part1, $part2, $part3, $part4); I'm particularily concerned aboute single quotes. How do I escape them? Should I? Here is what I thi

[PHP] Re: Where am I?

2002-12-17 Thread John Taylor-Johnston
Hope you got your answer before now? Run phpinfo(); inside a php file. See: $DOCUMENT_ROOT or $_SERVER["DOCUMENT_ROOT"] All other variables you need are listed there. $_SERVER["TEMP"], for example, is very useful. Don't forget to add the $ to the beginning of the variable name. I couldn't actu

Re: [PHP] test

2002-12-17 Thread John Taylor-Johnston
Y'sure? Spam bot? John Martin Towell wrote: > na! didn't work :) > > -Original Message- > From: Roger Lewis [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 18, 2002 4:59 PM > To: Php-General > Subject: [PHP] test > > This is a test. > > -- -- PHP General Mailing List (http://w

Re: [PHP] test

2002-12-17 Thread John Taylor-Johnston
Roger, Are you emailing or posting to the news group? John Roger Lewis wrote: > But it did! Otherwise I wouldn't have received your comment. Why did I get > this message from Mailer-Daemon: > > Sorry. Your message could not be delivered to: > > php-list,emc (The name was not found at the remote

[PHP] Re: mysql_num_rows

2002-12-17 Thread John Taylor-Johnston
I use $mycounter, not saying it is pretty. But if you have a whole bunch of stuff deleted, your last id might be worth a lot more than the actual number of rows. $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query('select * from '.$table.'

Re: [PHP] test

2002-12-17 Thread John Taylor-Johnston
Lookee there, I'm getting it now and I'm sending to the newsgroup. Subject: NDN: [PHP] Re: mysql_num_rows Date: Wed, 18 Dec 2002 14:18:28 +0800 From: "Mailer-Daemon" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sorry. Your message could not be delivered to:

[PHP] Re: repeat region

2002-12-19 Thread John Taylor-Johnston
Jeff or anyone, Ok, I'll bight. What are you doing with the % and %7 ? > $idx=1; > echo() > while(fetch_rows) { > printf("%s, ID); > if($idx%7=0) {echo(''} > ++$idx; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
I think this is perl? REMOTE_HOST How can I do this? I want to check the referer. If A do Aa, else Bb I can't find a variable in phpinfo() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
The deal is my ISP does a redirect from www.delete.compcanlit.ca to www.delete.compcanlit.usherbrooke.ca. I'm trying to if statement the redirect. Again, I find no variable in phpinfo(). John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
> What happened when you tried that? Nothing. Nothing showed. In fact nothing for getenv('REMOTE_HOST') in the else either. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
on my desktop and from an email message. Nothing appeared as the referrer. John John Nichel wrote: > Try... > > $_SERVER['HTTP_REFERER'] > > John Taylor-Johnston wrote: > > The deal is my ISP does a redirect from www.delete.compcanlit.ca to >www.delete.comp

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
age on my desktop and from an email message. Nothing >appeared as the referrer. > > John > > John Nichel wrote: > > > Try... > > > > $_SERVER['HTTP_REFERER'] > > > > John Taylor-Johnston wrote: > > > The deal is my ISP does a redi

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
a blank page on my desktop and from an email message. >Nothing appeared as the referrer. > > > > John > > > > John Nichel wrote: > > > > > Try... > > > > > > $_SERVER['HTTP_REFERER'] > > > > > > John Ta

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
> REFERRER isn't always set, so that may be the problem. > > Try just a simple HTML page that has a link to a PHP page that echo's > out $_SERVER['HTTP_REFERRER']. > > Does that work? No. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
>What do you get with this... >echo ( "\n" ); >print_r ( $_SERVER ); >echo ( "\n" ); >From a blank HTML page, I get: Array ( [DOCUMENT_ROOT] => /var/www/html2 [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* [HTTP_ACCEPT_CHARSET] => iso-8859-1,*,ut

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
>echo ( "\n" ); >print_r ( $_SERVER ); >echo ( "\n" ); On the redirect from http://compcanlit.ca/, I get: Array ( [DOCUMENT_ROOT] => /var/www/html2 [HTTP_ACCEPT] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* [HTTP_ACCEPT_CHARSET] => iso-8859-1,*,utf-8 [H

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
ere. One thing I did notice is that the redirect comes thru on a > different port. If this is consistant, you may be able to use this. > > John Taylor-Johnston wrote: > >>echo ( "\n" ); > >>print_r ( $_SERVER ); > >>echo ( "\n" ); > >

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
a link from another page, it was set. I'll look at it a bit > longer to see if there is anything out there to tell it was redirected, > but it's not looking good. > > John Taylor-Johnston wrote: > >>[SERVER_PORT] => 80 > > > > > > Server port d

[PHP] Duh uuh ?

2003-02-15 Thread John Taylor-Johnston
How do I call this? http://www.phpclasses.org/browse.html/file/2202.html calendar; //gives me nothing. Prints html header and that's it. It's a class and obviously I don't know what I'm doing :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

[PHP] Good grief

2003-02-18 Thread John Taylor-Johnston
Yawn of frustration. $dbtable = "ccl.ccl_main"; list($db,$table) = explode(".",$dbtable); echo $dbtable.''.$list[$db].''.$list[$table].''; echo $dbtable."".$list[$db]."".$list[$table].""; I stumped :) $list[$db]shows nothing $list[$table] shows nothing Ok, newbie time :( What's wrong? -

Re: [PHP] Good grief

2003-02-18 Thread John Taylor-Johnston
Rasmus, >You probably want just $db and $table Yes I do. I need to learn a little more about declaring arrays & its syntax. I figured I was declaring an array called "list". Then ... :) Copied & tinkered from: http://www.php.net/manual/en/function.explode.php Thanks!

Re: [PHP] Good grief

2003-02-18 Thread John Taylor-Johnston
Rasmus, If I were going to remanufacture http://www.php.net/manual/en/function.explode.php I would add/edit: $data = "foo:*:1023:1000::/home/foo:/bin/sh"; list($user,$pass,$uid,$gid,$gecos,$home,$shell) = explode(":",$data); echo $user."".$pass."".$uid."".$gecos."".$home."".$shell; Thanks agai

[PHP] Re: file not opening in internet explorer

2003-02-18 Thread John Taylor-Johnston
check.php and even am able to read the written contents. > > but when i enter http://192.168.0.1/bdoi_change/sundar.html > in my internet explorer address bar, it says the page cannot > be displayed. > the file permissio

[PHP] Re: file not opening in internet explorer

2003-02-19 Thread John Taylor-Johnston
Ok, someone help him out. Maybe, just maybe the file belongs to someone else than you. I had that happen to me once too. CuteFTP can show you that. Is this possible people? What happened when you checked the permissions? 644? Then CHMOD it 644 again yourself to see if it makes a difference. ht

[PHP] Re: file not opening in internet explorer

2003-02-19 Thread John Taylor-Johnston
>dear john, > >i made the CHMOD myself to 644. >but the file is still not opening. >do u have any more ideas? Sorry no. Tapped out. But I'm not a pro coder myself. Someone will answer. Someone is awake and coding. Come on guys. Give the lady a break. >and i am not 'he'.i am 'she'. I stand corre

Re: [PHP] file not opening in internet explorer

2003-02-19 Thread John Taylor-Johnston
> > the file permissions are "rw-r-r" > Stupid question -- are you running a webserver? Charming isn't he? > /* > The fact that 47 PEOPLE are yelling and sweat is cascading down my > SPINAL COLUMN is fairly enjoyable!! > */ Indeed. Help the "colleague" out Jason, or get off the channel. -- PH

[PHP] Can I do this? header("Content-type: text/rtf");

2003-02-20 Thread John Taylor-Johnston
Hey, I'm using PHP & MySQL to generate a RTF document. I use this header: header("Content-type: text/rtf"); Of course, the header scares the poor browser. The browser bawks and says, unknown file type, and instructs the browser to save the file. It tries to save a file called "export_to_rtf_te

[PHP] Re: new to php, need help..

2003-02-20 Thread John Taylor-Johnston
Just a hunch: "" Try using " Do you have a URL to show us what your page does and doesn't do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: is there php debuggers or IDE under Linux?

2003-02-20 Thread John Taylor-Johnston
I didn't know a debugger was available? Then again, I'm no expert. However, as an aside note, rename your file to *.PHPS This will display your code in a readable, color-coded fashion, allowing you to decipher possible problems yourself. Newbie advice, but helps some. -- PHP General Mailing Li

Re: [PHP] Can I do this? header("Content-type: text/rtf");

2003-02-20 Thread John Taylor-Johnston
Works great. Thanks, John > >I'm using PHP & MySQL to generate a RTF document. I use this header: > >header("Content-type: text/rtf"); > header("Content-Disposition: attachment; filename

[PHP] University researcher's question

2003-02-23 Thread John Taylor-Johnston
[i] How or why do researchers adapt technology to their research projects? Should they adapt their projects to technology? Indeed, how often does the research assistant end up reinventing the wheel? [/i] I know most of you are E-Commerce oriented, but I would appreciate your feedback. I use PHP

[PHP] Re: Permission Denied

2003-02-23 Thread John Taylor-Johnston
lly CHMOD them all to 777 with no problems. I don't see why I'm getting > all this! Please help ASAP! Thanks in advance! -- John Taylor-Johnston - "If it's not open-source, it's Murphy's L

[PHP] Re: Question about replacing \r\n with

2003-02-23 Thread John Taylor-Johnston
\015\012)|(\015)|(\012)/","", $txt); > > I can substitute other characters and dec equivalents and the > substations just won't work for \r\n [or just \r or just \n] or "\015" > or "\15". > > And, I've t

[PHP] Re: sending results by email

2003-02-23 Thread John Taylor-Johnston
http://www.php.net/manual/en/function.mail.php Note my changes in your HTML! mail("[EMAIL PROTECTED]", "Subject: sending results by email", "MyText: \n$MyText \ncheckbox2: $checkbox2"); HTH? John > > > > > >

Re: [PHP] Help with Multiple Checkboxes

2003-02-23 Thread John Taylor-Johnston
> Does id even exist? HTH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Why use persistent connections? || Data driven site

2003-02-23 Thread John Taylor-Johnston
I stopped using pconnect. Don't see the sense in it. Why take the chance? http://www.php.net/manual/en/function.mysql-pconnect.php Warning Using persistent connections can require a bit of tuning of your Apache and MySQL configurations to ensure that you do not exceed the number of connections al

Re: [PHP] Help with Multiple Checkboxes

2003-02-23 Thread John Taylor-Johnston
Style sheet stuff?

Re: [PHP] University researcher's question

2003-02-23 Thread John Taylor-Johnston
own progress, which will be a > big relief for the administration people. So it is university related but > not really research related. -- John Taylor-Johnston - "If it's not open-source, it's M

[PHP] include

2003-02-23 Thread John Taylor-Johnston
t variable can I muster up to do this? -- John Taylor-Johnston - "If it's not open-source, it's Murphy's Law." ' ' ' Collège de Sherbrooke: ô¿ô http://www.collegesherbr

Re: [PHP] include

2003-02-23 Thread John Taylor-Johnston
Which variable should I use? _SERVER["HTTP_HOST"] _SERVER["SERVER_NAME"] HTTP_HOST Server_NAME Host -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] include

2003-02-23 Thread John Taylor-Johnston
Jason, $_SERVER is outdated now isn't it? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Which function?

2003-02-23 Thread John Taylor-Johnston
Instead of doing this: Which function am I looking for to see if $HTTP_HOST contains "compcanlit"? This is not what I am looking for: http://www.php.net/manual/en/function.similar-text.php John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

[PHP] explode(" ", $pizza)

2003-02-24 Thread John Taylor-Johnston
Off topic :) ? Anyone know how to explode using javascript? $pieces = explode(" ", $pizza); John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mysqldump

2003-02-26 Thread John Taylor-Johnston
Anyone do MySQLDump using PHP ? http://www.mysql.com/doc/en/mysqldump.html My code is: mysqldump -u ** -p ** -A > /home/mybackups/dump_all.sql I would like to pull it off using PHP, remotely. $date = date ("Ymd"); $to_path = "/home/MyBackups/$date/dump_all.sql"; mysqldump -u ** -p

[PHP] Re: mysqldump

2003-02-26 Thread John Taylor-Johnston
Thanks! > exec("mysqldump -c -q database -u user -ppassword", $sql); Why is there no space between the -p and password? >-ppassword Am I wrong? Thanks, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: One more string question

2003-02-26 Thread John Taylor-Johnston
Stripslashes I think. Gregory Chagnon wrote: > When I submit a form with a text area containing the test "//server/share" > and try to echo the variable it echos "server//share". Is there any way > to prevent the extra /'s? Thanks

[PHP] exec & mysqldump

2003-02-26 Thread John Taylor-Johnston
This works: exec("mysqldump -u -p -A > test.sql"); This doesn't. exec("mysqldump -u -p -A > $filename"); :) $filename"); echo "dump completed on $filename "; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] exec & mysqldump

2003-02-26 Thread John Taylor-Johnston
Scratch that. Had a CHMOD problem. Sorry. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP & MySQL "Move"

2003-02-28 Thread John Taylor-Johnston
Assuming MySQL can do this, I need to generate some code that would MOVE a record from one table to another. Not just a MySQL code problem? Pseudo code: base.table select base1.table where id=25 insert result base2.table delete base1.table where id=25 Can I even do this in MySQL? If so, what wi

[PHP] Re: PHP & MySQL "Move"

2003-02-28 Thread John Taylor-Johnston
I was wondering about this, but decided to ask first first: INSERT INTO ccl.ccl_main VALUES (select * from greid.ccl where id=28); delete * from greid.ccl where id=28; Both tables would have to have the same structure ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

[PHP] Re: PHP & MySQL "Move"

2003-03-03 Thread John Taylor-Johnston
Found this for anyone interested. http://www.mysql.com/doc/en/INSERT_SELECT.html John Taylor-Johnston wrote: > I was wondering about this, but decided to ask first first: > > INSERT INTO ccl.ccl_main VALUES (select * from greid.ccl where id=28); > delete * from greid.ccl where id=

[PHP] \n

2003-03-04 Thread John Taylor-Johnston
Nothing fancy. Can't get it to echo ¶ mary had a little lamb if ($testtextarea) { $inputresult = str_replace(\n, '¶'.\n, $testtextarea); echo "$inputresult"; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Tried: [PHP] \n

2003-03-04 Thread John Taylor-Johnston
I have also tried: $inputresult = str_replace('\n', '¶\n', $testtextarea); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] \n

2003-03-04 Thread John Taylor-Johnston
Jon, Anyone, Paragraph sign actually. I'm filterting some data for MySQL. I need a field delimiter. I don't want to use \n. Contents of each field are on a signel line of text. I have come up with this, unless someone can suggest better: if ($testtextarea) { $inputresult = str_replace("\r", "",

[PHP] StrPos/stristr

2003-03-04 Thread John Taylor-Johnston
http://www.php.net/manual/en/function.stristr.php http://www.php.net/manual/en/function.strpos.php Input from a I want to scan endless lines of $something. If the First Three characters of any line begin with "au:" (case insensitive) I want to filter out that line, and let $au = that line of tex

[PHP] Re: filesave

2003-03-04 Thread John Taylor-Johnston
","")or die("Could > not connect"); > print "Connected successfully"; > mysql_select_db("bdoi_change")or die("could not select > database"); > > $query = "select * from entry where login='$login&

[PHP] crontab

2003-03-04 Thread John Taylor-Johnston
Can I run a php script in crontab? Do I echo or print? Anyone doing it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] crontab

2003-03-04 Thread John Taylor-Johnston
Cal, Liam, Jimmy, Thanks. If this is a serious security hazard, could you show me some code that is more secure? I am the "root". Mind you I've never worked with crontab before. I want to run /var/www/backup_mysql.php I suppose I should start by putting it somewhere not publicly accessible? Tha

[PHP] syntax error

2003-03-04 Thread John Taylor-Johnston
Sigh :) It all works so much better if I use: if(eregi('^au: (.*)$',$line,$m)) { But I want to use a function. But nothing is returned. So what did I do wrong now? --snip echo filter_strings("au:"); function filter_strings($tofilter){ echo $tofilter.""; #if(eregi('^$

Re: [PHP] syntax error

2003-03-04 Thread John Taylor-Johnston
Thanks Keven. Didn't see that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] fopen

2003-03-05 Thread John Taylor-Johnston
#http://www.php.net/manual/en/function.fopen.php $contents = fopen ("/home/pathto/file.txt", "r"); if ($contents){echo"$contents";} else{echo "no contents there";} Questions: What is the use of "@fopen"? Does anyone see a better way? -- PHP General Mailing List (http://www.php.net/) To unsubs

Re: [PHP] PHP vs. CGI

2003-03-05 Thread John Taylor-Johnston
Three advantages I like: 1- no more cgiwrap. 2- thus I can work in any directory and am not bound to cgi-bin 3- Sheer ease of coding. A lot easier to learn, it's open-source and newsgroups are more helpful. Perl groups are less helpful, programmer centred and not newbie-friendly. Just my 2¢ --

[PHP] Re: PHP vs. CGI

2003-03-05 Thread John Taylor-Johnston
If you switch over, will you be able to port your database? > Does PHP use less system resources than CGI on a server? > I have a bulletin board which is incredibly active, but there is a PHP > sister to it. Again, when coding for a BB, I appreciate not being bound to work in /cgi-bin/ especial

[PHP] Re: fopen

2003-03-05 Thread John Taylor-Johnston
Mat>To get data out of the file that you Mat>have opened, you will need to read() it n. Mat>http://www.php.net/manual/en/function.fread.php Ok, how about this? What about error checking if the file contains something as I include below? Is that enough? $contents";} else{echo "no contents there";

[PHP] error checking with fread

2003-03-05 Thread John Taylor-Johnston
http://www.php.net/manual/en/function.fread.php What about error checking if the file contains something as I include below? Is that enough? Is this the right way? $contents";} else{echo "no contents there";} ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

[PHP]

2003-03-05 Thread John Taylor-Johnston
Instead of using fread, I want to upload a *.txt file using: and display it in a textarea. Where do I go now? Specifically, how do I get $contents? Thanks, John $contents";} else{echo "no contents there";} ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

[PHP] fread or not?

2003-03-05 Thread John Taylor-Johnston
I need to upoload a local text file into memory using: The script below will only work if I am using my localhost. Any ideas? John \n"; if (!$filename) { echo "!\$filename \n"; }else{ #$filename = "/usr/local/something.txt"; #echo "\$filename $filename\n"; $handle = fopen ($filename, "r");

[PHP] I'm lost: text file upload

2003-03-05 Thread John Taylor-Johnston
Jason, I've already been looking at: http://www.php.net/manual/en/function.move-uploaded-file.php http://www.php.net/manual/en/features.file-upload.common-pitfalls.php http://www.php.net/manual/en/features.file-upload.php Indeed: http://ca.google.yahoo.com/bin/query_ca?p=php.net+upload+file and ht

[PHP] Re: How PHP recover value from another frame?

2003-03-05 Thread John Taylor-Johnston
You are going to need to start a session. http://www.php.net/manual/en/ref.session.php http://www.php.net/manual/en/function.session-start.php The idea was to see if $variable was in the session. If it was, use the session variable. I was passing a lot of variables through before this, until I

Re: [PHP] I'm lost: text file upload

2003-03-05 Thread John Taylor-Johnston
Where in the manual? > > I'm looking for a couple of lines of code so I can upload the contents of a > > *.txt into a buffer > You can't upload to a 'buffer', it has to be a file. Example in manual on how to > upload a file. Here? http://www.php.net/manual/en/features.file-upload.php ?? > BUT i

[PHP] $HTTP_POST_FILES

2003-03-06 Thread John Taylor-Johnston
Nifty. To share my finding ... Thanks, John Upload File C:\WINDOWS\Bureau\microweb\ERIC.TXT Read this file: Upload Results Your file contained: \n"; echo "$fileContents\n"; echo "\n"; #echo ($fileContents); ?> file_uploads = 1 upload_max_filesize = 2M upload_tm

[PHP] _FILES

2003-03-06 Thread John Taylor-Johnston
$HTTP_POST_FILES as opposed to $_FILES is older syntax? $HTTP_POST_FILES is still compliant? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] include or function

2003-03-06 Thread John Taylor-Johnston
I have an *.inc with html, a rather long list of . I want to clean this up some. I'm going to declare $FieldName and $ToBeSelected before I call include("options.inc"). I also want to select one of the in advance. The problem is ... this is beginning to look like a function, which I will decla

[PHP] MYSQL :(

2003-03-06 Thread John Taylor-Johnston
Ok, I'm off topic. I'm trying to build some php code but can't get my SQL right. http://www.mysql.com/doc/en/INSERT_SELECT.html insert into ccl.ccl_maintest (id,RNum,YR,AU,ST,SD,SC,BT,BD,BC,AT,AD,AC,SR,PL,PR,JR,VNum,INum,DT,PG,LG,SF,OL,KW,AUS,GEO,AN,RB,CO,RR) select id,RNum,YR,AU,ST,SD,SC,BT,BD,B

Re: [PHP] MYSQL :(

2003-03-06 Thread John Taylor-Johnston
ur field list? > insert into ccl.ccl_maintest (id,RNum,YR,AU,ST > ^^^ > Here :) > > > > J -- John Taylor-Johnston - "If it's

[PHP] Array - Newbie question

2003-03-08 Thread John Taylor-Johnston
New at this, somewhat: http://www.php.net/manual/en/ref.array.php $EricCodesArray = array ( "CO" => "Description", "Input Name", "Select Name", "Option Name", "Option Selected", "AN" => "ERIC Number", "EricAN", "SelAN", "AN", "AN «Annotation»", "TI" => "Title", "EricTI", "SelTI", "BT"

Re: [PHP] Array - Newbie question

2003-03-08 Thread John Taylor-Johnston
echo $EricCodesArray[2][2]; No. > would this work ? > $EricCodesArray[2][2] ? > #http://www.php.net/manual/en/ref.array.php > $EricCodesArray = array ( > "CO" => "Description", "Input Name", "Select Name", "Option Name", > "Option Selected", > "AN" => "ERIC Number", "EricAN", "SelAN", "

  1   2   3   4   5   6   >