Re: [PHP] Tip for cookies

2001-04-17 Thread Joe Stump
Check out "global" it allows you to make things "global" or at the top of your file you could do a define with the cookie value in it an it would be accessbile without passing the value to the function - this saves both time in typeing and is faster since it doesn't have to copy the cookie value t

Re: [PHP] select question

2001-04-17 Thread Joe Stump
In MySQL you can do this: $sql = "SHOW TABLES LIKE 'box%'"; $r = mysql_query($sql); // then loop through the tables and populate --Joe On Tue, Apr 17, 2001 at 07:49:11PM -0400, Matt TrollBoy Wiseman wrote: > How would I word a query to see what tables exist in a db that begin with > box > >

Re: [PHP] MySQL data

2001-04-17 Thread Joe Stump
There are a few ways to do this... 1.) Copy the binary files over in the mysql data directory ... have to be root and normally at a shell. 2.) SELECT * FROM table and then while() you have rows INSERT INTO other_table those values 3.) mysqldump can be used via PHP and used by most users

RE: [PHP] MySQL data

2001-04-17 Thread Maxim Maletsky
#3 is the easiest... from command line: # mysqldump -uroot db_from > db.sql # mysql -uroot db_to < db.sql Now, the entire database was copied. This is the easiest way for the whole database. With single table it is quite similar. Also if the table in db_to already exists, then it might mak

[PHP] mysql error code - how to debug

2001-04-17 Thread pyz
Greetings, This is a mysql question, (but I'm using php with it). Most everything is working correctly; however, when I hit one button I get: Database error: cannot use database xx MySQL Error: 0 () Session halted. What should I be looking for? Is this a user/password problem? Is this

RE: [PHP] How do i include ASP script into PHP...??!

2001-04-17 Thread Dennis Gearon
http://asp2php.naken.cc/ Haven't been there, haven't done that, BUT, I do have the t-shirt! -- - Look lovingly upon the present, for it holds the only things that are forever true. ---

RE: [PHP] Dynamic built web pages administration

2001-04-17 Thread Manisha
Hi, I am also working on a project similar like this. I am creating a News Module which will allow user to create their own pages and post it on web with images chosen. Edit option also will be given to edit the content. I thought of following options. Please note that I am not always sticking

[PHP] HELP!! "print" problem

2001-04-17 Thread Martin Skjöldebrand
I'm blind!! Whats wrong here? $besk has a value at one place but not in another? Jeez M. $besk=$row1[0]; print "beskr $besk"; <-- prints value of $besk print ""; <-- works print " "; <-- DOES NOT PRINT A THING!! print " "; <-- works print " "; <--works

Re: [PHP] HELP!! "print" problem

2001-04-17 Thread [EMAIL PROTECTED]
You're missing a single quote after the value of MAXLENGTH on the line that's not working... Maybe that's the problem. -- [ Swift eNetwork ] Matrix > http://matrix.swifte.net/ -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

[PHP] Last 10 rows

2001-04-17 Thread Randy Johnson
How do I get the last 10 rows in a table? thanks randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Last 10 rows

2001-04-17 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Randy Johnson") wrote: > How do I get the last 10 rows in a table? {select clause} order by {fieldname} desc limit 10 -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: [PHP] Last 10 rows

2001-04-17 Thread Rasmus Lerdorf
> How do I get the last 10 rows in a table? select blah from foo order by something desc limit 10 -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail:

Re: [PHP] PHP/OCI8 design for persistent connection tuning

2001-04-17 Thread Dave Thomas
Yeah, that's what I'm thinking. I could tune the images server way down for flat content and massive bandwith. The only problem I can see is that webmasters hate having to code that extra info. Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECT

Re: [PHP] HELP!! "print" problem

2001-04-17 Thread Martin Skjöldebrand
[EMAIL PROTECTED] wrote: > You're missing a single quote after the value of MAXLENGTH on the line > that's not working... Maybe that's the problem. > Yes!! Thanks! I thought I was going crazy. Martin S. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECT

Re: [PHP] Last 10 rows

2001-04-17 Thread Joe Stump
Well - what is considered the last of the list? Is it a number? are they names? Either way you have a field you are ordering by ... SELECT * FROM table ORDER BY lastname DESC LIMIT 10; that'll do the trick. FYI you can sort numbers, dates, and chars - this is from the hip and you might be able

RE: [PHP] select question

2001-04-17 Thread Don Read
On 17-Apr-01 Matt \"TrollBoy\" Wiseman wrote: > How would I word a query to see what tables exist in a db that begin with > box > > for example include > boxTABLE1 > boxTABLE2 > boxTABLE3 > but exclude > sphereTABLE1 > > I'm basically trying lo populate a list box with the tables beginning with

[PHP] select question

2001-04-17 Thread Matt \"TrollBoy\" Wiseman
How would I word a query to see what tables exist in a db that begin with box for example include boxTABLE1 boxTABLE2 boxTABLE3 but exclude sphereTABLE1 I'm basically trying lo populate a list box with the tables beginning with box in PHP. Matt "Trollboy" Wiseman www.shoggoth.net/trollboy/troll

Re: [PHP] select question

2001-04-17 Thread Steve Werby
"Matt "TrollBoy" Wiseman" <[EMAIL PROTECTED]> wrote: > How would I word a query to see what tables exist in a db that begin with > box > > for example include > boxTABLE1 > boxTABLE2 > boxTABLE3 > but exclude > sphereTABLE1 > > I'm basically trying lo populate a list box with the tables beginning

[PHP] Importing Data from Text File

2001-04-17 Thread Chris Aitken
Hi Everyone, Ive been asked to do a task here at my work and its something ive never done before. I was hoping you guys could point me in the right direction so I can research some more and discover how in the hell im gonna do this :) Basically, I have been issued a TAB delimited text file whi

[PHP] Is it possible to parse a variable by character?

2001-04-17 Thread Sean Coyle
Hey there guys, This may seem like a dumb question, but I have to ask it anyway. I have a form in one of my php based scripts that allows for file uploads. I recently noticed a potential issue if people upload files containing anything else but the standard characters ([_a-z0-9-]+(\.[_a-z0-9

Re: [PHP] Importing Data from Text File

2001-04-17 Thread Chris Fry
Chris, What you need to do is read each line of the file into an array: $aryInput = file("/path/filename", "r"); Connect to the Database: $dbh = mysql_connect ("localhost", "user", "password"); if (! $dbh) { print "Error connecting to the Database Engine"; } Select the table: mysql_selec

[PHP] mySQL Question....

2001-04-17 Thread Jason Caldwell
if i perform a SELECT query (say) like the following: SELECT email_addr FROM myTable WHERE x = 1 in this query i want to pull-out (or list) all email addresses where x equals 1, however, suppose i don't want any duplicate email addresses... would i use ORDER BY and COUNT(*) to get listing of no

RE: [PHP] mySQL Question....

2001-04-17 Thread Opec Kemp \( Ozemail \)
> if i perform a SELECT query (say) like the following: > > SELECT email_addr FROM myTable WHERE x = 1 > > in this query i want to pull-out (or list) all email > addresses where x equals 1, however, suppose i don't want any > duplicate email addresses... would i use ORDER BY and COUNT(*) to get l

Re: [PHP] mySQL Question....

2001-04-17 Thread Jason Caldwell
Opps. I meant GROUP BY... and it looks like I don't need to include the COUNT(). SELECT email_addr, x GROUP BY email_addr HAVING x = 1; Is this the only way to display a listing without duplicates, or is there a more efficient (faster) way? I don't want to DELETE the duplicates, just don't want

RE: [PHP] Is it possible to parse a variable by character?

2001-04-17 Thread Maxim Maletsky
$str = eregi_replace("[^[_a-z0-9-]]", '_', $str) would this 2-seconds written-in, non-tested scratch of code do the job? If not then something like this... eregi_replace() is what you are looking for. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins)

Re: [PHP] mySQL Question....

2001-04-17 Thread Don Read
On 18-Apr-01 Jason Caldwell wrote: > Opps. I meant GROUP BY... and it looks like I don't need to include the > COUNT(). > > SELECT email_addr, x GROUP BY email_addr HAVING x = 1; > > Is this the only way to display a listing without duplicates, or is there a > more efficient (faster) way? I do

[PHP] Files without type???

2001-04-17 Thread Morten Winkler Jørgensen
Hi php'ers Executing the following code on my Redhat 7.2 box, through Apache i get the most annoying output: Code: function listDirectory($basedir){ $diary_directory = opendir($basedir); while($filename = readdir($diary_directory)) { if(strcmp(".", $filename) != 0) { if(strc

[PHP] need help

2001-04-17 Thread chris herring
this is really buggin me... i've got this free-for-all that i want to make, and everything seems logical, but echo ""; echo ""; echo ""; echo ""; echo ""; if (isset($url) && isset($text)) { $fp = fopen("./file.txt", "w"); fwrite("$fp", "$text", "w"); fclose($fp); } ... that i

Re: [PHP] Is it possible to parse a variable by character?

2001-04-17 Thread Yasuo Ohgaki
[Cross post to php-lang] Regular expression functions can do the job and already have reply. Answer for the original question: How to access string by character. I'm not sure if accessing string as array is going to be depreciated or not. (Or is it already depreciated???) But you could do $str =

[PHP] suEXEC CGI how-to

2001-04-17 Thread Cameron
The topic says it, i was wondering if anyone had a how-to on suEXEC CGI php. I have used the cgi before but havnt ever had the time to setup the suEXEC. Wondering if there is a guide to save me going crazy. Cameron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMA

Re: [PHP] Files without type???

2001-04-17 Thread David Robley
On Wed, 18 Apr 2001 15:53, Morten Winkler Jørgensen wrote: > Hi php'ers > > Executing the following code on my Redhat 7.2 box, through Apache i > get the most annoying output: > > Code: > > function listDirectory($basedir){ > $diary_directory = opendir($basedir); > while($filename = readdir(

php-general Digest 18 Apr 2001 06:46:13 -0000 Issue 634

2001-04-17 Thread php-general-digest-help
php-general Digest 18 Apr 2001 06:46:13 - Issue 634 Topics (messages 49021 through 49132): SOMEONE SHOOT ME!!! 49021 by: Rick Kukiela 49032 by: Martín Marqués 49054 by: Godd 49084 by: Phillip Bow `AM_PROG_LIBTOOL' not found in library 49022 by: Pablo

[PHP] mySQL - select column

2001-04-17 Thread Julian Wood
Hi all, Given that the resultset from a mysql query is a 2-d array (of sorts - I don't know), if I retrieve only a single column, is there an easy way to grab it as a linear array? For example - old way: $uids=array(); $res = mysql_db_query("db", 'select uid from tbl;', $link); while ($row = my

Re: [PHP] Is it possible to parse a variable by character?

2001-04-17 Thread CC Zona
In article <9bjcj6$dg6$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Yasuo Ohgaki") wrote: > I'm not sure if accessing string as array is going to be depreciated or not. > (Or is it already depreciated???) I made a note of this a while ago when it came up on the list, because initially it sounded to

Re: [PHP] need help

2001-04-17 Thread Geir Eivind Mork
On Wednesday 18 April 2001 08:38, chris herring wrote: > this is really buggin me... i've got this free-for-all that i want to > make, and everything seems logical, but I did a quick rewrite here. it adds links as people enters them :) Url: Nam

Re: [PHP] need help

2001-04-17 Thread David Robley
On Wed, 18 Apr 2001 16:08, chris herring wrote: > this is really buggin me... i've got this free-for-all that i want to > make, and everything seems logical, but > > echo ""; > echo " value=\"http://\">"; echo " size=\"20\">"; > echo " Link\">"; echo ""; > > > > if (isset($url) && isset($text)

Re: [PHP] PHP/OCI8 design for persistent connection tuning

2001-04-17 Thread Remigiusz Sokolowski
Dave Thomas wrote: > > Yeah, that's what I'm thinking. I could tune the images server way down for flat >content and massive bandwith. > > The only problem I can see is that webmasters hate having to code that extra info. Hi! You could also think about something like sqlRelay (www.firstworks.

[PHP] Variable variable

2001-04-17 Thread Jacky
Hi all I have a form with check box and name of those checkboxes is usuing variable lke this, and when I submit the form to page foo.php4, at that page, I use Variable variable to call the value of the check box to see if it checked like this $quey = "select id from table"; $result = ..

Re: [PHP] Variable variable

2001-04-17 Thread Ulf Wendel
Jacky schrieb: > > > > and when I submit the form to page foo.php4, at that page, I use Variable variable >to call the value of the check box to see if it checked like this > > $quey = "select id from table"; > $result = .. ( assumeing it is done and i got value for $id for all records

<    1   2   3