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
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
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
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
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
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
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
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
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,
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
>> $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_
30 matches
Mail list logo