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_order_part_no=parts_pa
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
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
* 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
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
Can you echo out the sql going in and any errors you're getting when the
query doesn't work then post that info to this list? It'll help both you and
us diagnose what might be going wrong. In addition, what datatype are the
columns named start and end in your database?
(Assuming database is MySQL
"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
);
>
> while ( $row = mysql_fetch_array( $TICKET_WORK_INFO ) )
> {
> $ticket_id = $row["ticket_id"];
> $start = $row["start"];
> $end = $row["end"];
> $total_hours = $r
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
";
while( $row = mysql_fetch_array($result) )
{
$FirstName = $row['FirstName'];
$LastName = $row['LastName'];
$id=$row['id'];
print "$LastName, $FirstName";
}
?>
print "";
-Original Message-
From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 12:45 PM
To: [E
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]>
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
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
Did you print out the value of $sql before executing it? Was it as you
expected?
If so, did you print out mysql_num_rows() to verify it's greater than 0?
-Original Message-
From: Todd Williamsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 2:52 PM
To: [EMAIL PROTECTED]
Subj
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
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
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_
Try this
$query = 'SELECT * FROM table
$mysql_result = mysql_query($query, $link);
while($row = mysql_fetch_array($mysql_result))
{
switch ($row["event"] )
{
case event_one:
$bg = 'blue'
break;
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 =
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
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
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
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;
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
24 matches
Mail list logo