Does anybody know how to remove an item from an array?
Let's say
$array('banna', 'apple','cherry')
foreach ($array as $value) {
if ($value=='chery') DELETE $value FROM $array
...
Thanks
Hiya,
Just wondering what is the rough idea of speed of a server like this is
holding a database with millions of records. I know its difficult, depends
on the data stored etc.
Its basically storing an index int and about 5 or so char field (50
long). In total I want to store 500 million
Hi
The following will print the variables ($tim1 and $tim2) correctly but the
IF statement using the same vars will not work, it will only work as below
which seems to work by comparing the text values of the 2 variables $tim1
$tim2.
while($myrow = mysql_fetch_array($result))
{
$tim1=timea;
Hi
I've written a guestbook in php
user writes a message in a texarea and in the code I insert it in a table
and then in showpage I sow it to him.before I insert the message into table
, I use addslashes() and htmlspecialchars(). the prblem is that , when I
retrieve the message from the table
check out the nl2br() function!!
good luck
-Original Message-
From: Siamak Sadeghianfar [mailto:siamak116;hotmail.com]
Sent: vrijdag 8 november 2002 15:31
To: [EMAIL PROTECTED]
Subject: [PHP-DB] textarea!!
Hi
I've written a guestbook in php
user writes a message in a texarea and
SELECT * FROM user_tables;
will give you the list of tables and properties.
I think the table name's columns is called: 'table_name' so this should
be:
SELECT table_name FROM user_tables;
--
Maxim Maletsky
[EMAIL PROTECTED]
[EMAIL PROTECTED] wrote... :
I'm very new at this. Can I list
to precise:
$array = Array('name'='Maxim', 'surname'='Maletsky');
unset($array['name']);
// now array has this structure:
// Array('surname'='Maletsky')
--
Maxim Maletsky
[EMAIL PROTECTED]
Jason Wong [EMAIL PROTECTED] wrote... :
On Friday 08 November 2002 17:25, nikos wrote:
Does
Steve Vernon [EMAIL PROTECTED] wrote... :
Hiya,
Just wondering what is the rough idea of speed of a server like this is
holding a database with millions of records. I know its difficult, depends
on the data stored etc.
Also rather the design and, whether do you really need to store it
Hello All!
i am new to the list to PHP..
So i have a recordset that displays my contacts in a table.
the headers of the columns look like this.
tda href=default2.php?orderBy=priLastNameLast Name/a/td
so when a user clicks on it
It will Re-Sort the rs by priLastName Asc.
what i want to do is
Let's see:
?
$dir = ((isset ($_GET['dir'])) ? (int) $_GET['dir'] : 1);
if (!$dir)
$direction = 'desc';
$dir = ($dir ? 0 : 1);
?
tda href=default2.php?orderBy=?=$colname?dir=?= $dir?Last
Name/a/td
This is the general idea. $dir will toggle between 1 and 0. There are
more compact ways
(I know this is more of a mySQL question than PHP, but allow me this one if
you would...)
In MySQL, is there any difference between creating an index at table
creation time, and creating an index on an existing table? Does an index
created on an existing table re-index itself after each
It would seem that your IF statement, as it is written below, evaluates to
true every time because I'm guessing that the hexadecimal value of the
string timeb is larger than the hexadecimal value of timea. Like I said,
just a guess.
I'm also guessing that you actually want to compare two values
Index is always re-indexing itself on INSERT/UPDATE. Roughly, I don't
think there is any difference in when you create an index before or
after table is populated.
--
Maxim Maletsky
[EMAIL PROTECTED]
Jason Vincent [EMAIL PROTECTED] wrote... :
(I know this is more of a mySQL question than
Except when you have a million records, which may take a few seconds to
build. :-)
Marco
-
php|architect -- The Monthly Magazine For PHP Professionals
Come visit us on the web at http://www.phparch.com!
On Fri, 2002-11-08 at 11:12, Maxim Maletsky wrote:
Index is always
On Friday 08 November 2002 23:08, Maxim Maletsky wrote:
Steve Vernon [EMAIL PROTECTED] wrote... :
Hiya,
Just wondering what is the rough idea of speed of a server like this
is holding a database with millions of records. I know its difficult,
depends on the data stored etc.
Also
well i tried that..
but it out puts the right number.
but it is not taking that var to switch ACS or DESC...
http://localhost/php/default2.php?orderBy=priLastNamedir=0
http://localhost/php/default2.php?orderBy=priLastNamedir=1
/* here we set up out order by clause */
$orderBy = 'priLastName';
On Saturday 09 November 2002 00:26, Paul Ihrig wrote:
well i tried that..
but it out puts the right number.
but it is not taking that var to switch ACS or DESC...
http://localhost/php/default2.php?orderBy=priLastNamedir=0
http://localhost/php/default2.php?orderBy=priLastNamedir=1
/* here
I think you might be missing a = sign in your if statement.
Marco
-
php|architect -- The Monthly Magazine For PHP Professionals
Come visit us on the web at http://www.phparch.com!
On Fri, 2002-11-08 at 11:26, Paul Ihrig wrote:
well i tried that..
but it out puts the right
I was running a site on a dual 800 CPU, 1GB ram, dual mirrored 18GB drives,
doing about 16.8GB per day on average, including PHP/HTML code.
The system had several tables (~20), some regularly accessed, some not.
The biggest table was a log table of about 2.5+ million rows. Ran reports
from it
Use the dual table questions and answers suggestion before.
Then just use a loop:
$question = mysql_query(select * from questions where id={$this_question});
while ($r = mysql_fetch_array($question)) {
$answers = mysql_query(select * from answers where qid={$r[id]});
while ($s =
Thanks Guys..
This seemed to do the trick
/* and the desc asc */
$dir = ((isset ($_GET['dir'])) ? (int) $_GET['dir'] : 1);
if (!$dir)
$dir = ($dir ? 0 : 1);
if ($HTTP_GET_VARS['dir'] == 0) {
$diri = 'DESC';
}
if ($HTTP_GET_VARS['dir'] == 1) {
$diri = 'ASC';
}
I am trying to do a search and replace into a text file that will then
get saved to a new name once the info has been replaced.
So I have been able to do this with simple ..['name'] variable replace.
But how do I get it to save the results into a text file.
Program work Flow - for creating a
The problem is, I need to make a page that shows all of the polls, and
one query per poll would kill the server.
Peter Beckman wrote:
Use the dual table questions and answers suggestion before.
Then just use a loop:
$question = mysql_query(select * from questions where id={$this_question});
Leif,
off the wall...what if you have a table for question, identified with an
unique ID, and another where you store the results? BTW: how are the
questions? Yes/No, or multiple choices, or combination of these two
styles?
On Fri, 8 Nov 2002, Leif K-Brooks wrote:
The problem is, I need to
Hi,
I've dealt with databases with about 100 million records
(100Gb of data/indexes), using Oracle, and i'm glad we did.
If you database is 5 times larger than our largest one, you definitely
you need Oracle or something high end.
Steve Vernon [EMAIL PROTECTED] wrote in message
d.. 20 GB traffic/month
e.. RedHat LInux 7.2
Red Hat Advanced Server is better - it has Oracle patches for better
asynch i/o performance.
If for Oracle, I'd then recommend SuSe.
--
Maxim Maletsky
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To
In MySQL, is there any difference between creating an index at table
creation time, and creating an index on an existing table? Does an
index
created on an existing table re-index itself after each insert/update,
or
does it only index itself once - when you create the index?
In the end, it's
But, remember - you don't rebuild completely an index - you rather add
to it.
So, there are three scenarios:
1. Q: You create the table to then send into it lots of data row per row
A: create the table first, then build an idex on it once.
2. Q: You have to constantly be adding the data
Hi, Can anybody give me a simple example of using
PHP's mysql_query to perform mulitple mysql queries.
I am using MySQl 3.23, trying to use create temporary
table and insert ... select to overcome the lack of
union operation in that verion of MySQL.
Thanks!
Qunfeng Dong
Hi, Can anybody give me a simple example of using
PHP's mysql_query to perform mulitple mysql queries.
I am using MySQl 3.23, trying to use create temporary
table and insert ... select to overcome the lack of
union operation in that verion of MySQL.
Thanks!
Mysql_query() can only do one
Thanks a lot! Great quick help!!!
--- Paul DuBois [EMAIL PROTECTED] wrote:
I don't know how to merge all the results from each
mysql_query.
$result1 = mysql_query(CREATE temporary table
tempTable ...);
$result2 = mysql_query(insert ...);
...
$resultn-1 = mysql_query(select * from
31 matches
Mail list logo