Hi,
I have a MySQL varchar column which I wish to display. Most of the
entries are numbers eg 1, 2, 3 etc etc. But some are numbers and letters
eg 34A, 34B, 35A.
When I display the column I am able to sort by number using the "order
by column_name+0" command, as in:
$result = mysql_query("SELECT
I made the change but the domain\username now appears in my database as:
domainusername
-Original Message-
From: Ramil Sagum [mailto:[EMAIL PROTECTED]
Sent: Friday, 1 October 2004 11:40 AM
To: Baiocchi, Justin (CSIRO IT, Armidale)
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] The vari
No, still no idea :)
I did read the manual but I can't figure out how to use it in my script.
I'll paste the page below:
AEC Submission Title:
mailto:[EMAIL PROTECTED]
Sent: Friday, 1 October 2004 11:24 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] The var
Thanks Ramil,
I knew it had something to do with the \, but I still can't figure out
how to get the variable into the database without the extra '\'
It is entered into the database via a form using the input below:
Where would I use the mysql_real_escape_string ?
Thanks
Justin
-Original
Hi,
When I use the variable $_SERVER['AUTH_USER'] it comes out as
domain\\username when inserted into the MySQL database. So when I try to
update the record looking for a match as below it doesn't work because
the query is looking for where ident=domain\username.
$result = mysql_query("UPDATE aec
Not to worry - manage to solve the problem using the line below
$date=date('H:i');
echo "";
Thanks for all the input
-Original Message-
From: Baiocchi, Justin (CSIRO IT, Armidale)
Sent: Friday, 6 August 2004 12:50 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Php if statement in a fo
Well, this works: so you were all on the right track
if($row['timeout']=="")
{
print "";
}else{
print $row["timeout"];
}
But now I get a parse error on the line
-Original Message-
From: Ng Hwee Hwee [mailto:[EMAIL PROTECTED]
Sent: Friday, 6 August 2004 12:30 PM
To:
Still no joy. The parse error actually refers to the -- if
($row["timeout"] IS NULL); --- line.
-Original Message-
From: Eric Schwartz [mailto:[EMAIL PROTECTED]
Sent: Friday, 6 August 2004 11:32 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Php if statement in a form
Sorry. Forgot t
Thanks Eric,
I have changed it somewhat but am just getting a parse error,
unexpected T_STRING on that line.
My revised code is below:
print "Current Staff Working Alone";
print "";
print "\n";
print "\n";
print
"NameLocationTime
inTime Out/tr>";
while ($row = mysql_fetch_array($result, MYSQL_B
Hello, I wonder if someone could point me in the right direction here.
I have a table that is displayed that is also a form, and allowed a
person to select a record to update using a radio button. With one of
the fields of the form/table however, I would like it to display the
value in the db (if
Hi Neil,
I have tried it like that with no luck, what is below just happens to be
my latest attempts to get it working.
What is happening is that it is saying that $C and $G are zero, when in
fact there is data in there.
How do I get it to 'refresh' the variables? That is what I am trying to
do
Ok, I was trying to keep it simple :), but here goes:
In essence the problem is that (at the end of the script)
income_out is coming out as just $option_close_price and not the
intended $option_close_price*$no_sold, and
profit_loss is coming out as just -$option_close_price and not the
intended $in
Sam,
I have changed it but the result is still the same:
Basically I am getting $E = $C , it seems that it is not picking up the
value of $G (and there is a value of 500 in there and it is the only row
of data).
-Original Message-
From: Sam Chill [mailto:[EMAIL PROTECTED]
Sent: Thursd
Hi there, I hoped someone might be able to tell me why this is not
working.
I have a form that updates the table 'media' with the 3 values below,
that and some other variables are the only data in the table. That works
nicely.
I then want to update one of the other columns ($E) based on the
Thanks Gary and those who replied,
What I have ended up doing is using 3 tables: the original, a temporary
one and the target table. It's clunky and probably not the way to do it,
but this is my first php application and is just a learning exercise.
-Original Message-
From: Gary Every [
Hi,
I am trying to do the following:
- retrieve data from a table based on the $id field (easy enough)
- add a few more fields to the data set, then
- enter the data (and new fields) into a new table (based on the
selected $id field)
I'm just not sure how to structure this, do I use a temporary t
Actually, I have just figured it out. It had to do with the 'slashes'
around the query. The original $sql code was created using phpmyadmin,
but I messed around with it until it worked, now using the following
query:
mysql_query("LOAD DATA INFILE 'C:abc.txt' INTO TABLE abc FIELDS
TERMINATED BY
Hello,
I have a page with a button that when clicked loads a pre-determined
text file into my database. The code is posted below.
However, when clicked the button does nothing, just opens up the same
page again. The data does not get loaded into the database. any ideas?
Thanks
Justin
The pag
18 matches
Mail list logo