I have a MyISAM table holding images with field types bigint(20), mediumblob,
varchar(255), blob and tinyint(3). The table has grown to over 800 MB and over
6,000 rows. In the past week, performance has been about 15-20 seconds to run
the following select statement which pulls only 16 maximum
I meant
'Analyze table'
and
'the composite key field2 field3 would be unique'
- Original Message -
From: Dwight Altman [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Wednesday, August 10, 2005 4:23 PM
Subject: [PHP-DB] SELECT Performance and INDEXing
I have a MyISAM table holding
I have no problem creating a table, using a query from my dbase table news:
SELECT * FROM table where column = VALUE.
However, now that most of our articles have more than one column type (i.e.
instead of just technology, the column can now contain technology, politics,
local.
You need
On Tuesday 21 June 2005 10:35 pm, Dan Fulbright wrote:
I have no problem creating a table, using a query from my dbase table
news:
SELECT * FROM table where column = VALUE.
However, now that most of our articles have more than one column type
(i.e. instead of just technology, the
Hello all,
I have no problem creating a table, using a query from my dbase table news:
SELECT * FROM table where column = VALUE.
However, now that most of our articles have more than one column type (i.e.
instead of just technology, the column can now contain technology, politics,
use full text searches
http://dev.mysql.com/doc/mysql/en/fulltext-search.html
bastien
From: [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] select * from table where column 'CONTAINS' more than one
value (how?)
Date: Tue, 21 Jun 2005 20:49:12 EDT
Hello all,
I have no problem
You can use LIKE and wildcards, which is faster than fulltext searches, which
will provide you a lot of information you don't need.
Do this:
SELECT * FROM table where column LIKE %politics% OR column LIKE %local%
to find if the field contains politics or local..
-Micah
On Tuesday 21 June
, andthis FROM rev ORDER BY rev
By the way, having rev as a name for your table AND as a fieldname is
confusing and not advisable.
Rgds,
Jos
-Original Message-
From: MIGUEL ANTONIO GUIRAO AGUILAR
[mailto:[EMAIL PROTECTED]
Sent: 17 May 2005 04:26
To: php-db@lists.php.net
Subject: [PHP-DB
distinc needs a field
select distinct(name) from table
bastien
From: MIGUEL ANTONIO GUIRAO AGUILAR [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] Select
Date: Mon, 16 May 2005 19:26:20 -0700
Hi!!
I have this query in PHP:
$items2 = mysql_query(SELECT DISTINCT * FROM rev ORDER BY rev
Hi!!
I have this query in PHP:
$items2 = mysql_query(SELECT DISTINCT * FROM rev ORDER BY rev, $link);
I have three rows with the same data on it, and DISTINCT seems to be not
working, since I got all the rows, any ideas of what is going wrong?
--
MIGUEL GUIRAO AGUILERA
PM
Subject: Re: [PHP-DB] select text from a text file
On Wed, 5 Jan 2005 11:58:59 -, Ed [EMAIL PROTECTED] wrote:
Happy new year folks!
The titlemight make this seem like an easy to answer question
However here's the complicated bit (well for me anyway).
In my text file
Message -
From: Andrew Kreps [EMAIL PROTECTED]
To: Ed [EMAIL PROTECTED]; php-db@lists.php.net
Sent: Thursday, January 06, 2005 6:55 PM
Subject: Re: [PHP-DB] select text from a text file
On Wed, 5 Jan 2005 11:58:59 -, Ed [EMAIL PROTECTED] wrote:
Happy new year folks!
The titlemight make
Message -
From: Jochem Maas [EMAIL PROTECTED]
To: Ed [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Friday, January 07, 2005 11:37 AM
Subject: Re: [PHP-DB] select text from a text file
Ed wrote:
Hi,
Thanks for answering the question.
I'm going to make it write to a database rather
grabbed message after you have selected it for output.
have fun!
Ed
- Original Message -
From: Jochem Maas [EMAIL PROTECTED]
To: Ed [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Friday, January 07, 2005 11:37 AM
Subject: Re: [PHP-DB] select text from a text file
Ed wrote:
Hi,
Thanks
PROTECTED]
CC: php-db@lists.php.net
Subject: Re: [PHP-DB] select text from a text file
Date: Fri, 7 Jan 2005 08:58:18 -
Hi,
Thanks for answering the question.
I'm going to make it write to a database rather than text file after
searching google and coming accross common problems with text files.
I've
the
answer.
Ed
- Original Message -
From: Bastien Koert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Friday, January 07, 2005 2:06 PM
Subject: Re: [PHP-DB] select text from a text file
simple, add a 'read flag' column to the table, when
On Wed, 5 Jan 2005 11:58:59 -, Ed [EMAIL PROTECTED] wrote:
Happy new year folks!
The titlemight make this seem like an easy to answer question
However here's the complicated bit (well for me anyway).
In my text file that is written to by the users in a chatroom it looks like
this:
Happy new year folks!
The titlemight make this seem like an easy to answer question
However here's the complicated bit (well for me anyway).
In my text file that is written to by the users in a chatroom it looks like
this:
nickname||color||what the user is saying||user
how can i make it so
Hello,
I want to create a new row in the db by copying an existing one. My
db has an auto incrementing id so I can't simply do insert into cars
select * from cars where id=$id as this throws the primary key error.
How can I do this with out specifying each column?
Thanks!
--
PHP Database
INSERT INTO `dbname`.`newtablename`
SELECT *
FROM `dname`.`oldtablename` ;
bastien
From: blackwater dev [EMAIL PROTECTED]
Reply-To: blackwater dev [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] select particular columns in query
Date: Wed, 8 Dec 2004 10:46:44 -0500
Hello,
I want
The manual is your friend.
You cannot execute the SQL statement you provided because mysql specifically
disallows it:
http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html
Same reference, your presumption about auto-increment columns is also wrong.
Doug
blackwater dev wrote:
Hello,
I want to
PROTECTED]
Subject: [PHP-DB] select particular columns in query
Hello,
I want to create a new row in the db by copying an existing one. My
db has an auto incrementing id so I can't simply do insert into cars
select * from cars where id=$id as this throws the primary key error.
How can I do this with out
pls. help.
i have grant all to one of my tables made in mysql. now when i want to
retrieve the data through PHP, following error is coming
=
select command denied to user: '[EMAIL PROTECTED]' for table
'timeframe'
=
pls. advise what went wrong.
with best wishes
balwant
--
PHP
pls. help.
i have grant all to one of my tables made in mysql. now when i want to
retrieve the data through PHP, following error is coming
=
select command denied to user: '[EMAIL PROTECTED]' for table
'timeframe'
=
pls. advise what went wrong.
with best wishes
balwant
--
PHP
I'm trying to pull all the records from the table class where classID is
not equal to the value of classID in the table assignment.
Currently, I have 'select class.classID, class.classDesc from class,
assignment where assignment.classID = class.classID and
assignment.assignmentID=$assidn'.
I'm trying to pull all the records from the table class where classID is
not equal to the value of classID in the table assignment.
Currently, I have 'select class.classID, class.classDesc from class,
assignment where assignment.classID = class.classID and
assignment.assignmentID=$assidn'.
Thanks!
It works
Cole
On Thu, 2004-08-26 at 16:45, [EMAIL PROTECTED] wrote:
I'm trying to pull all the records from the table class where classID is
not equal to the value of classID in the table assignment.
Currently, I have 'select class.classID, class.classDesc from class,
Chris Payne wrote:
I'm using Booleans in my searches (New to it) but it works perfectly
on my
local 3.23 version of MySQL, but on the main server which uses version 4 of
MySQL I get an error so there's an error in my Syntax. Here's what I
currently use:
[snip]
Hi there everyone,
I'm using Booleans in my searches (New to it) but it works perfectly on my
local 3.23 version of MySQL, but on the main server which uses version 4 of
MySQL I get an error so there's an error in my Syntax. Here's what I
currently use:
SELECT id, def, word,
0.2*(
Hello,
I would like to display my news like this:
*10.04.2004.*
- news 1
- news 2
- news 3
*14.04.2004.*
- news 4
*15.04.2004.*
- news 5
...
I'm thinking of some while loop but I'm not sure that it will work nor I
know how to create that query.
TNX
--
PHP Database Mailing List
From: T. H. Grejc [EMAIL PROTECTED]
I would like to display my news like this:
*10.04.2004.*
- news 1
- news 2
- news 3
*14.04.2004.*
- news 4
*15.04.2004.*
- news 5
...
I'm thinking of some while loop but I'm not sure that it will work nor I
know how to create that query.
Hi!
You can use order by date and such method:
code
$result = mysql_query(blablabla);
$date = foo;
while($news = mysql_fetch_array($result)){
if ($date==$news[date]){
echo new date;
}
echo $news[text];
$date = $news[date];
}
Monday, May 17, 2004, 3:50:04 PM, T. wrote:
ORDER BY date, text ?
Hi!
You can use order by date and such method:
code
$result = mysql_query(blablabla);
$date = foo;
while($news = mysql_fetch_array($result)){
if ($date==$news[date]){
echo new date;
}
echo $news[text];
$date = $news[date];
}
Monday, May
Irin said:
$sql = mysql_query(SELECT * FROM class where timetable_day='Monday');
$row = mysql_fetch_array($sql);
$result = $db-query($sql);
$numofrows = mysql_num_rows($sql);
From the PHP manual:
array mysql_fetch_array ( resource result [, int result_type])
You can't send the function
Irin said:
$sql = mysql_query(SELECT * FROM class where timetable_day='Monday');
Oops, I see that he DID do a mysql_query and save the result resource in
$sql. Sorry, guys! I haven't had my coffee yet this morning!
Katie Dewees
Web Developer
E-mail: [EMAIL PROTECTED]
--
PHP Database Mailing
Hi all,
I am having having a slight problem with SELECT query statement.
I have a table Class. The table are as follow:
++--+--+-+-++
| Field | Type | Null | Key | Default | Extra |
Hi I have a table users with columns name email and access
In email I have values [EMAIL PROTECTED] etc in access I have values 1,2,3,4,7,8
How can I filter value 2 ?
Beacause I need only users with value 2 to send email
Greetings
--
PHP Database Mailing List (http://www.php.net/)
To
Hello peppe,
Thursday, March 4, 2004, 11:28:30 AM, you wrote:
p Hi I have a table users with columns name email and access
p In email I have values [EMAIL PROTECTED] etc in access I have values 1,2,3,4,7,8
p How can I filter value 2 ?
p Beacause I need only users with value 2 to send email
SELECT
...
FROM users
WHERE FIND_IN_SET( 2, values ) 0
Ignatius
_
- Original Message -
From: peppe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 12:28
Subject: [PHP-DB] SELECT
Hi I have a table users with columns name email and access
The problem is in access values are like string 1,2,3,4,5
Richard Davey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello peppe,
Thursday, March 4, 2004, 11:28:30 AM, you wrote:
p Hi I have a table users with columns name email and access
p In email I have values [EMAIL
Hello peppe,
Thursday, March 4, 2004, 12:02:40 PM, you wrote:
p The problem is in access values are like string 1,2,3,4,5
Sorry, I didn't realise that. In this case FIND_IN_SET (which I think
Ignatius suggested too).
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
_
- Original Message -
From: peppe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 12:28
Subject: [PHP-DB] SELECT
Hi I have a table users with columns name email and access
In email I have values [EMAIL PROTECTED] etc in access I have values
1,2,3,4,7,8
How
??
Didn't you say that $access[1] contains sets such as 1,2,3,4,7,8?
Why compare it to 2?
_
- Original Message -
From: peppe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 13:22
Subject: Re: [PHP-DB] SELECT
Hi
I made this query
$sql
-
From: peppe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 13:22
Subject: Re: [PHP-DB] SELECT
Hi
I made this query
$sql= SELECT * FROM users WHERE FIND_IN_SET( 2, access ) 0 ;
$result = mysql_query($sql);
$numRows = mysql_num_rows($result
peppe schrieb:
for ($row =1; $row = $numRows; $row++) {
$rowArray = mysql_fetch_array($result);
$access1 = $rowArray[1];
Hi Peppe,
although I don't know the function mysql_fetch_array()...
why you use $rowArray[1], which is the first element (if $rowArray is of
type array).
¡Hi all!
I have a problem and I don't find the solution, my problem is when I
try to do a select on a object table, it returns '*Warning*: Ora_Parse
failed (ORA-00911: carácter no válido -- while processing OCI function
OPARSE)'
I'm working with this code in pl/sql :
create Type TArtPrueba
Hello,
I have two mysql tables songs and artists. They look like this:
CREATE TABLE `artists` (
`artist_id` int(10) unsigned NOT NULL auto_increment,
`artist_name` varchar(100) default NULL,
`artist_img` varchar(50) default NULL,
PRIMARY KEY (`artist_id`),
UNIQUE KEY `artist_name`
($res)) {
echo stripslashes($res-customer).'br'.\n;
}
hth?
_ma
# life would be easier if i knew the source code...
Von: Aleks @ USA.net [EMAIL PROTECTED]
Datum: Wed, 5 Nov 2003 13:12:45 -0500
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] Select Value with 's
This is a basic question but I am all
From: pete M [EMAIL PROTECTED]
do not quite understand your problem.. pls post some code?
heres a small snippet that should work well...
$qry = 'SELECT `customer` FROM `customerList` ORDER BY `customer`';
$res = mysql_query($qry);
while($customer = mysql_fetch_object($res)) {
);
while($customer = mysql_fetch_object($res)) {
echo stripslashes($res-customer).'br'.\n;
}
hth?
_ma
# life would be easier if i knew the source code...
Von: Aleks @ USA.net [EMAIL PROTECTED]
Datum: Wed, 5 Nov 2003 13:12:45 -0500
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] Select
From: Boyan Nedkov [EMAIL PROTECTED]
Putting more than one table in the FROM clause means tables are joined,
then at least following problems could arise:
- using WHERE clause you can have empty recordset returned and then
COUNT conflicts with it because there is actually no any data to be
This is a basic question but I am all messed up and need to be straightened
out..
Have a select field called customer that works great except when there is a
' in the customer name.
Have tried addslash and stripslashes but I think I might be using them
wrong.
If I addslash to the select
;
}
hth?
_ma
# life would be easier if i knew the source code...
Von: Aleks @ USA.net [EMAIL PROTECTED]
Datum: Wed, 5 Nov 2003 13:12:45 -0500
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] Select Value with 's
This is a basic question but I am all messed up and need to be straightened
out
To: PHP-DB
Subject: Re: [PHP-DB] Select Value with 's
hi!
do not quite understand your problem.. pls post some code?
heres a small snippet that should work well...
$qry = 'SELECT `customer` FROM `customerList` ORDER BY `customer`'; $res =
mysql_query($qry); while($customer = mysql_fetch_object($res
From: Aleks @ USA.net [EMAIL PROTECTED]
First I build my select list:
SELECT NAME=Cid size=1
OPTION Selected VALUE=All Customers/OPTION
?
While ($Site = mysql_fetch_array($S))
{
$Sid = $Site[CID];
$SName = htmlspecialchars($Site[Customer]);
echo(option
(): supplied argument is not a valid MySQL result
-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 1:45 PM
To: Aleks @ USA.net; 'ma'; 'PHP-DB'
Subject: Re: [PHP-DB] Select Value with 's
From: Aleks @ USA.net [EMAIL PROTECTED
-0500
An: 'CPT John W. Holmes' [EMAIL PROTECTED], 'ma'
[EMAIL PROTECTED], 'PHP-DB' [EMAIL PROTECTED]
Betreff: RE: [PHP-DB] Select Value with 's
Thanks John for the answer But...
Now my select statement on the Result.php page errors out when
The value has the [']in it. What
Sorry I left out the exact form
It is
$info = mysql_query( Select * From customer Where customer.customer LIKE 'St
Mary's Hospital');
-Original Message-
From: ma [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 1:56 PM
To: PHP-DB
Subject: Re: [PHP-DB] Select Value
be easier if i knew the source code...
Von: Aleks @ USA.net [EMAIL PROTECTED]
Datum: Wed, 5 Nov 2003 14:01:37 -0500
An: 'ma' [EMAIL PROTECTED], 'PHP-DB' [EMAIL PROTECTED]
Betreff: RE: [PHP-DB] Select Value with 's
Sorry I left out the exact form
It is
$info = mysql_query( Select
it
-Original Message-
From: ma [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 2:07 PM
To: PHP-DB
Subject: Re: [PHP-DB] Select Value with 's
hi
ok - than make it this way:
$info = mysql_query( Select * From customer Where customer.customer LIKE St
Mary's Hospital);
anyways - shouldn't
['] is confusing it
-Original Message-
From: ma [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 2:07 PM
To: PHP-DB
Subject: Re: [PHP-DB] Select Value with 's
hi
ok - than make it this way:
$info = mysql_query( Select * From customer Where customer.customer LIKE St
-
From: ma [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 2:29 PM
To: PHP-DB
Subject: Re: [PHP-DB] Select Value with 's
hi
hm - it would help if you'd send us the code where you
generate the query
_ma
# life would be easier if i knew the source code...
Von: Aleks
-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 2:52 PM
To: PHP-DB
Subject: RE: [PHP-DB] Select Value with 's
Using your variables and query, the following, based on one of my own
functional pages, the following should work:
$FF = addslashes($_POST[Cid
You are most welcome, Aleks. Glad it helped.
-Original Message-
From: Aleks @ USA.net [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 3:01 PM
To: 'Hutchins, Richard'; 'PHP-DB'
Subject: RE: [PHP-DB] Select Value with 's
BINGO Thanks Rich... I just realized were I
I cannot seem to get a SELECT COUNT for a query from fields in two different tables
and a WHERE clause. Does anyone know if this is not possible with php/mysql or am I
doing something wrong? I have tried a number of variations on the following code:
$sql = SELECT COUNT(*), bandid, bandname,
Mark Gordon wrote:
I cannot seem to get a SELECT COUNT for a query from fields in two different tables and a WHERE clause. Does anyone know if this is not possible with php/mysql or am I doing something wrong? I have tried a number of variations on the following code:
$sql = SELECT COUNT(*),
Yes, query is definitely working without COUNT(*). Even in the most stripped down
form, the query fails:
$sql = SELECT COUNT(bandid), genre
FROM bands, genre;
$result=mysql_query($sql);
while ($gen=mysql_fetch_row($result)) {
echo $gen[1];
}
John W. Holmes [EMAIL PROTECTED] wrote:
Mark Gordon
Mark Gordon wrote:
Yes, query is definitely working without COUNT(*). Even in the most stripped down form, the query fails:
$sql = SELECT COUNT(bandid), genre
FROM bands, genre;
$result=mysql_query($sql);
while ($gen=mysql_fetch_row($result)) {
echo $gen[1];
}
Fails how? If it echos zero, it's
Putting more than one table in the FROM clause means tables are joined,
then at least following problems could arise:
- using WHERE clause you can have empty recordset returned and then
COUNT conflicts with it because there is actually no any data to be
returned;
- joining two (or more)
Thanks for the debug advice - I will start using my_sql_error
First I got this error:
Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if
there is no GROUP BY clause
So the correct code ended up:
$sql = SELECT COUNT(bandid), genre
FROM bands, genre
GROUP BY
Hi,
How can I SELECT a portion of a field in a table for example the first
character, or the second two characters etc?
Thanks for your help
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
SUBSTRING()
_
- Original Message -
From: Shaun [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 29, 2003 11:57 AM
Subject: [PHP-DB] SELECT Part of a Field
Hi,
How can I SELECT a portion of a field in a table for example the first
character
Depending on the database you are using
Substring()
Substr()
Functions do what you want
jack
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED]
Sent: Friday, August 29, 2003 11:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SELECT Part of a Field
Hi,
How can I SELECT
:04 PM
To: John Ryan
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] SELECT FROM 2 or more tables
A join merges every record in one table with every record in another
table, which is something you rarely want to do. So you want to set a
filter on the merged records, which can be anything, but is usually
looking for a better way to query and cehck for overlapping timeframes.
am selecting records for display that has 3 fields of importance;
date_time (unix timestamp)
session_time (in seconds)
user_id (text field)
Of all the sessions recorded, we are looking for a
Is it easy?? Is it possible?? Should I just run 2 different queries and
output their results in the PHP script and make it look like it's all from
the same table
I cant grasp JOIN for the life of me
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
select t1.name,t2.salary from personal t1,sal t2
where t1.id=t2.id;
- Original Message -
From: John Ryan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 4:41 PM
Subject: [PHP-DB] SELECT FROM 2 or more tables
Is it easy?? Is it possible?? Should I just run 2
John,
It sounds like you need to read basic documentation on combining SQL queries.
Basically, you need to have a column that is common across both tables.
Eg., in TABLE1 have a column named TABLE1ID. Have the same ID cross referenced in TABLE2.
The ID would be sequenced in some way
A join merges every record in one table with every record in another
table, which is something you rarely want to do. So you want to set a
filter on the merged records, which can be anything, but is usually a
match between a field in one table and a field in another table.
That's a join in two
: Brent Baisley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 3:04 PM
To: John Ryan
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] SELECT FROM 2 or more tables
A join merges every record in one table with every record in another
table, which is something you rarely want to do. So you want
Hehe, ok, that was bad there for a second :)
Ben
-Original Message-
From: Brian Dailey [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 3:24 PM
To: Ben Lake; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] SELECT FROM 2 or more tables
No, he meant rarely want to join entire tables
PROTECTED]
Sent: Friday, 04 July, 2003 12:08
Subject: [PHP-DB] SELECT question
What is the syntax for running a SELECT command with multiple conditions?
Example SELECT * FROM members WHERE user_id='$u_id' AND email='$email';
Thanks
--
PHP Database Mailing List (http://www.php.net
I have a php script that does some select statements, on mysql, and
outputs that to a table. I would like to change the color of the table
row depending upon one of the fields. The select statements are from a
syslog database that I have and I would like to highlight key events by
changing the
/tr';
}// end while
HTH
Peter
-Original Message-
From: Christopher Lyon [mailto:[EMAIL PROTECTED]
Sent: 17 June 2003 22:35
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Select Statement with output in different colors.
I have a php script that does some
.'
tdda da da nbsp;/td
/tr';
}// end while
?
Edward Dudlik
Becoming Digital
www.becomingdigital.com
- Original Message -
From: Peter Lovatt [EMAIL PROTECTED]
To: Christopher Lyon [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, 17 June, 2003 17:42
Subject: RE: [PHP-DB] Select
9:51 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Select Statement with output in different
colors.
Here's a slight alteration to Peter's code in case someone isn't
familiar with
switch statements. Ooh, such a bad pun, as if there's any other kind.
?
$query = 'SELECT * FROM table
I hope this is something easy I am overlooking but here goes:
I have a table called: country which has the following fields:
FieldType
ip_from double(11,0)
ip_todouble(11,0)
country_code char(2)
country_name varchar(50)
IP_FROM
On 13 Jun,2003 at 0:48 G E Holt wrote:
$resolved=$DB_site-query_first(SELECT * FROM country WHERE
'$resolvingip' BETWEEN ip_from AND ip_to);
Don't think you should have the '' around the ip number. Does that help?
Ronan
e: [EMAIL PROTECTED]
t: 01903 739 997
w: www.thelittledot.com
The
On Friday 13 June 2003 15:48, G E Holt wrote:
I hope this is something easy I am overlooking but here goes:
I have a table called: country which has the following fields:
FieldType
ip_from double(11,0)
ip_todouble(11,0)
country_code
Here's how I did it when playing with this...
Table definition:-
CREATE TABLE ip_list (
ip_from double default NULL,
ip_to double default NULL,
country_code char(2) default NULL,
country_name varchar(100) default NULL,
KEY ip_from (ip_from,ip_to,country_code,country_name)
)
Why not use the built-in conversion functions in mysql?
From the manual:
quote
INET_NTOA(expr)
Given a numeric network address (4 or 8 byte), returns the dotted-quad representation
of the address as a string:
mysql SELECT INET_NTOA(3520061480);
- 209.207.224.40
INET_ATON(expr)
Given
be unlawful.
-Original Message-
From: Michelle Whelan [ mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ]
Sent: woensdag 19 maart 2003 9:06
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SELECT * FROM Command
Hi,
I have a question about how to display results. I am using PHP
: [PHP-DB] SELECT * FROM Command
guess it is hard to answer this with so less information
first show us how the table defenition is... how it is build
up and then
which fields you want to show to the user!
then I or others can help you much more
-Ok, this is what I have. I hope this is what you are looking for. I'm looking to
format this search results page so that the results come back with the entire entry
that also matches the zipcode that was searched.
ex: zipcode search = 90210
results for 90210 are:
contactname
phone
: Wednesday, March 19, 2003 1:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SELECT * FROM Command *REVISED*
-Ok, this is what I have. I hope this is what you are
looking for. I'm looking to format this search results page
so that the results come back with the entire entry that also
--- Michelle Whelan [EMAIL PROTECTED] wrote:
-Ok, this is what I have. I hope this is what you are looking for.
I'm looking to format this search results page so that the
results come back with the entire entry that also matches the
zipcode that was searched.
ex: zipcode search =
Yes,
option value=? echo $row-id; ? ? echo $selected; ? selected
You've hardcoded selected there and also expect it to be set
dynamically.
--
Maxim Maletsky
[EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi All,
I have a situation where I need to get data from more than one table, but where the
fields in the table are identical, the two tables are holding data for different
years. The queries I would like to execute would be something along the lines of this:
-
SELECT SUM(T1.F1) AS C1,
hi and thank you,
is there a reason this will not work? i am trying to echo an
option that has already been selected in a list menu. best, addison
select name=property
?
$obj = mysql_db_query($dbname,select * from ads where id=$id;);
while($row =
Hello PHP world!!! i've just finisched installing Apache 1.3.27
with PHP4 and 1.4 in Windows 2000. I've installed all off the scripts
that function all right in Linux Red Hat in Windows 2000, but when it
comes to do a simple select to a table that does exist and the select
is all right
101 - 200 of 310 matches
Mail list logo