[PHP-DB] Numeric value are coming in as halfs

2002-04-11 Thread eat pasta type fasta
I'm using PHP to read data from a file and dump it into an array, then I'mfeeding that array into mySQL transfer happens fine except that some the numeric values are halfed currenly I'm simply tweaking the output by going: (int) $player_data[16] = $player_data[16] * 2 / 10; the /10 is needed be

[PHP-DB] Re: count

2002-04-11 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > What is the Aliases used for??? > > > Aliases. SELECT COUNT(*) AS howmany FROM table > > > > Then use the variable $howmany At this stage I refer you to The Fine (mysql) Manual - or anything on the SQL language. -- David Robley Temp

RE: [PHP-DB] Upload Multiple Images

2002-04-11 Thread Beau Lebens
brandon, you can only ever upload 1 file per "file" input box, but you can have more than one of these input fields per form. you might have something like that way when you are processing (assuming PHP4+) you can use something like $HTTP_POST_FILES["file2"]["name"] blah blah hope that hel

[PHP-DB] Upload Multiple Images

2002-04-11 Thread Brandon Paul
Hi all...kinda new to PHP and MySQL...anyhow, I have created the following table: CREATE TABLE images ( id smallint(6) NOT NULL auto_increment, image_title varchar(75) default NULL, image_src varchar(150) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM; I have also created a form that allow

[PHP-DB] Re: how to notify admin by e-mail only once if mysql server is down

2002-04-11 Thread Ray Hunter
You can use webmin and set up the alert there for mysql. I use it for my webserver and database servers. It sends out 1 email for me telling me what is down. Ray Hunter "Andy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi there, > > I am wondering if i

Re: [PHP-DB] how to bring down the mysqlserver without getting an inconsistant db?

2002-04-11 Thread Andrey Hristov
not sure. "show tables" is fast, it is just a select from a table in the mysql db. Get the names and issue LOCK on them. But keep the names in a array and unlock them after that. Andrey - Original Message - From: "andy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 1

Re: [PHP-DB] how to bring down the mysqlserver without getting an inconsistant db?

2002-04-11 Thread Andrey Hristov
Have in mind this : LOCK TABLES locks tables for the current thread. UNLOCK TABLES releases any locks held by the current thread. All tables that are locked by the current thread are automatically unlocked when the thread issues another LOCK TABLES, or when the connection to the server is closed

Re: [PHP-DB] how to bring down the mysqlserver without getting an inconsistant db?

2002-04-11 Thread andy
what if I have 50 tables?? "Andrey Hristov" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 02f701c1e177$abd40040$0b01a8c0@ANDreY">news:02f701c1e177$abd40040$0b01a8c0@ANDreY... > Get all table names in a db and lock them :"show tables;"; > > Andrey > - Original Message - > From: "andy" <[EMAI

Re: [PHP-DB] how to bring down the mysqlserver without getting an inconsistant db?

2002-04-11 Thread Andrey Hristov
Get all table names in a db and lock them :"show tables;"; Andrey - Original Message - From: "andy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 7:37 PM Subject: [PHP-DB] how to bring down the mysqlserver without getting an inconsistant db? > Hi there, >

[PHP-DB] how to bring down the mysqlserver without getting an inconsistant db?

2002-04-11 Thread andy
Hi there, I am wondering what would be the best way to update a db. I would like to bring down the server, but I am afraid to get an inconsistant state of data. What if someone is just registering on another db? Is there a way to flush and lock the whole db not just some tables? Thanx, Andy PS

Re: [PHP-DB] Best way to not display frozen users?

2002-04-11 Thread Leif K-Brooks
on 4/11/02 11:14 AM, Leif K-Brooks at [EMAIL PROTECTED] wrote: I run a gaming website. Sometimes, I have to freeze users for one thing or another. But, since there are lots of tables involving users that get displayed to other users, they still get seen. One solution to this seems to be to hav

[PHP-DB] Best way to not display frozen users?

2002-04-11 Thread Leif K-Brooks
I run a gaming website. Sometimes, I have to freeze users for one thing or another. But, since there are lots of tables involving users that get displayed to other users, they still get seen. One solution to this seems to be to have an array of frozen users in the header, which I check when dis

[PHP-DB] R: PHP Question

2002-04-11 Thread Riccardi Moreno
When the user post a message, proccess the queries on temp page and then redirect to a page where you display message to user. In this case if he hits reload button, php don't repeat queries. I thing it should work. Bye Moreno -Messaggio originale- Da: Nick Stuart [mailto:[EMAIL PROTECTED

[PHP-DB] how to notify admin by e-mail only once if mysql server is down

2002-04-11 Thread andy
Hi there, I am wondering if it would be possible to set up a php application like this: If the mysql server is down notify by e-mail, but only once. Right now I am getting an e-mail per view if the server is down (might be lots of e-mails :-) thanx for any hint, Andy -- PHP Database Maili

[PHP-DB] need help on insert select statement

2002-04-11 Thread andy
Hi there, I would like to copy data from one table to another. My code just inserts one record. Not all 20. Why? This is my try: insert into parks_new (country, province, park) select * from national_parks_us_imported Thanx for any help Andy -- PHP Database Mailing List (http://www.php.net

Re: [PHP-DB] Re: count

2002-04-11 Thread Mike
Mike - Original Message - From: "Ron Allen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 7:13 AM Subject: [PHP-DB] Re: count > I know how to get the results for the total number of records > select count(*) from $table > but how do I put them into a variab

[PHP-DB] Re: count

2002-04-11 Thread Ron Allen
What is the Aliases used for??? > Aliases. SELECT COUNT(*) AS howmany FROM table > > Then use the variable $howmany > > -- > David Robley > Temporary Kiwi! > > Quod subigo farinam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: count

2002-04-11 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I know how to get the results for the total number of records > select count(*) from $table > but how do I put them into a variable for me to use later??? > > "David Robley" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news

[PHP-DB] Re: count

2002-04-11 Thread Ron Allen
I know how to get the results for the total number of records select count(*) from $table but how do I put them into a variable for me to use later??? "David Robley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > In article <[EMAIL PROTECTED]>, > [EMAIL PROTEC

Re: [PHP-DB] count

2002-04-11 Thread Mike
Sorry, That's not right. This is what I really meant to say. SELECT COUNT(column) as somename FROM table; or Select count(ID) name from $table; Mike - Original Message - From: "Allen, Ronald L CIV" <[EMAIL PROTECTED]> To: "Mike" <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 6:52 AM

Re: [PHP-DB] count

2002-04-11 Thread Mike
SELECT SUM(column) as somename FROM table; Mike - Original Message - From: "Ron Allen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 11, 2002 6:52 AM Subject: [PHP-DB] count > I would like to count all the total records from a database. How would I go > about doing

[PHP-DB] Re: count

2002-04-11 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I would like to count all the total records from a database. How would I go > about doing that??? Do a COUNT * on each table and total the results? Although the results may actually not mean much depending on your DB structure. Or do

[PHP-DB] Re: insert syntax

2002-04-11 Thread Michael Virnstein
you can only insert into one table at a time. if these statements depend on another and your db is able to generate transactions, then you can insert into your tables one by one and then commit the transaction on success or rollback it in the end, if a insert fails. if you're db isn't able to gene

[PHP-DB] Re: Local to Global Variables

2002-04-11 Thread Ron Allen
guessing here, but have you tried to use include'filename.txt' in your if statement? "Eat Pasta Type Fasta" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Not 100% DB related but soon > > I am processing a text file by looking for strings which later dependin

[PHP-DB] count

2002-04-11 Thread Ron Allen
I would like to count all the total records from a database. How would I go about doing that??? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: LOBS with CURSOR_SHARING=FORCE gives core dump

2002-04-11 Thread John Lim
Hmm, I have also been having similar problems with LOBs. However it might not be cursor_sharing=force, because on my Win 2000 oracle, LOBs work fine with PHP with this parameter set. However on our Sun server, PHP crashes as you mention (yes cursor_sharing=force is set here too). PS: this is set

RE: [PHP-DB] Re: security/setup question: php3 script contains db password, but scriptmust be readable by nobody: any solution?

2002-04-11 Thread Peter Lovatt
The only answer I know is in the php config, which you may not have acces to. php can be configured to run as the owner of the script that calls it. This means only your scripts can read your files. This is not the default option, and most ISPs just run the default, so your password is available t

RE: [PHP-DB] Local to Global Variables

2002-04-11 Thread Beau Lebens
if it is within a function, then you should define the var outside the function, then inside the function you can do this; $foo = "bar"; function foobar() { global $foo; $foo .= " bar"; } echo $foo // will output "bar bar"; HTH Beau // -Original Message- // From: eat pasta ty

[PHP-DB] Local to Global Variables

2002-04-11 Thread eat pasta type fasta
Not 100% DB related but soon I am processing a text file by looking for strings which later depending on the findings will be submitted to db my problems is that in one if statemant I find a piece of text and need another statment to use it later, but it seems that the variable declared to th

Re: [PHP-DB] MySQL Search problem

2002-04-11 Thread Tatang Widyanto
>> $query = "SELECT * FROM Players WHERE Player LIKE '%$player_nameA%' OR Player LIKE '%$player_nameB%' OR College LIKE '%$college%' OR Draft_Year LIKE '%$year_drafted%' OR Round_Drafted LIKE '%$round_drafted%' OR Position LIKE '%$position%' OR Years_Team_Search LIKE '%$year_team%' OR Uniform_