t: Tuesday, June 17, 2003 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 pu
om
- 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 Statement with output in different colors.
Try this
$query =
}
print '
da da da
';
}// 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
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 colo
Why not use the built-in conversion functions in mysql?
>From the manual:
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 t
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)
) TYPE=MyISAM;
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_cod
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
T
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
What's the error?
-Original Message-
From: Steve Dodkins [mailto:Steve.Dodkins@;ebm-ziehl.co.uk]
Sent: 25 October 2002 16:46
To: Php-Db (E-mail)
Subject: [PHP-DB] select statement
Hi
I get an error message with the following statement, if I remove the 'AND
works_ord
Hi
I get an error message with the following statement, if I remove the 'AND
works_order_part_no=parts_parts_no' I don't get an error message but also
get the wrong data ??
$link = mysql_connect($host, $user, $pass);
mysql_select_db("DB_EDMsystem", $link);
$result = mysql_query("SELECT * FRO
);
>
> while ( $row = mysql_fetch_array( $TICKET_WORK_INFO ) )
> {
> $ticket_id = $row["ticket_id"];
> $start = $row["start"];
> $end = $row["end"];
> $total_hours = $r
"start"];
$end = $row["end"];
$total_hours = $row["total_hours"];
$total_billable = $row["total_billable"];
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 2:26 PM
ing database is MySQL)
Rich
-Original Message-
From: Evan S. Weiner [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 2:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SELECT statement problem
Hello all,
I have this SQL statement I am trying to use and no matter what combination
I us
SELECT * FROM tickets_work
WHERE employee_id = '$tech_id' AND
start > '$start' AND
end < '$end'
ORDER BY start
Which will select everything from tickets_work for a given employee between
start and end. What is not working?
Miles Thompson
At 02:15 PM 8/15/2002 -0400, Evan S. W
Hello all,
I have this SQL statement I am trying to use and no matter what combination I use, I
cannot get it to work. The start and end if clauses need to be grouped together.
SELECT * FROM tickets_work WHERE employee_id = '$tech_id' && ( start > '$start' && end
< '$end' ) ORDER BY start
An
oops.forgot a semicolon on the first line of the multi-line code
segment
> -Original Message-
> $row = mysql_fetch_array($result)
> echo 'columnvalue';
> while(list($key, $val) = each($row)) {
> // $row has two key/value pairs per column -- one integer,
> one string
> if (is_
I am assuming that this code is NOT the file "do_mod_job.php".
What happens if you do this next line right after you execute your query?:
echo 'num rows fetched: '.mysql_num_rows($result).'';
also, the while loop shouldn't really be necessary as the query should only
return one record if I unde
Is your id an integer or a char/varchar? If it is an integer, take the
quotes off $id in your select statement.
Todd Williamsen <[EMAIL PROTECTED]> said:
> Weird..
>
> I want to be able to edit records, which I have done in the past, and I
> cannot see why it isn't working... I have tried
ECTED]
Subject: [PHP-DB] SELECT statement does not return rows
Weird..
I want to be able to edit records, which I have done in the past, and I
cannot see why it isn't working... I have tried single qoutes around the
$row = and that doesn't work either. here is the code:
$db = @mysql_sel
Weird..
I want to be able to edit records, which I have done in the past, and I
cannot see why it isn't working... I have tried single qoutes around the
$row = and that doesn't work either. here is the code:
$db = @mysql_select_db($db_name, $connection) or die("Could not select
database");
$s
27;; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Select statement only returns 1 record
Nope, that doesn't work
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 1:01 PM
To: 'Todd Williamsen'; [EMAIL PROTECTED]
Subject: RE: [P
Nope, that doesn't work
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 1:01 PM
To: 'Todd Williamsen'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Select statement only returns 1 record
";
while( $row = mysql
You will need to put the option tag in a loop to get all of the records in
the table.
(this can go anywhere but in while loop)
";
$i++;
}
?>
Also, without the value in the option tag, you will not be passing anything
to the form.
HTH
Maureen Biorn
Todd Williamsen <[EMAIL PROTECTED]>
PROTECTED]]
Sent: Wednesday, January 30, 2002 12:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Select statement only returns 1 record
I am trying to get data from two columns, FirstName and Last name and
displaying all the records LastName, FirstName in a drop down menu.
The weird thing is that i
Check the manual for the mysql_fetch_array() function, it shows you how to
extract data from $result. You will use the while loop (as shown in the
manual's example) to fill your combo box / selct list /drop down menu,
whatever we're calling that creature today.
Miles
At 12:45 PM 1/30/2002 -06
I am trying to get data from two columns, FirstName and Last name and
displaying all the records LastName, FirstName in a drop down menu.
The weird thing is that it only displays one record. I thought the table
was hosed, but its not. I tried it through another database and still
doesn't work.
* Julio Cuz, Jr. ([EMAIL PROTECTED]) wrote:
> Ron,
>
> Thanks for your help, but my problem still there even when I made the
> following changes:
>
> $sql = "SELECT * FROM \"Remodel\" WHERE Email=\"".$find."\"";
You don't have to quote the table name either. You can probably get
away with som
Ron,
Thanks for your help, but my problem still there even when I made the
following changes:
$sql = "SELECT * FROM \"Remodel\" WHERE Email=\"".$find."\"";
By the way, you're correct when saying that "WO" and "Email" are column
names and '"$find" is what the user entered when searching for a
At 03:24 PM 4/4/2001 -0700, Julio Cuz, Jr. wrote:
>Every time I run the following code, I get this error if I use a NUMBER
>for the 'Email' case:
>"Warning: Unable to jump to row 0 on PostgreSQL result index 2 in
>/html/rccd/remodel/display2.php on line 35"
The problem is that your query is equ
Hi--
Every time I run the following code, I get this error if I use a NUMBER for
the 'Email' case:
"Warning: Unable to jump to row 0 on PostgreSQL result index 2 in
/html/rccd/remodel/display2.php on line 35"
or, if I use a string (i.e. [EMAIL PROTECTED]), I get this error message:
"Warning: P
31 matches
Mail list logo