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
Justin,
Is the code you posted all of the code or just a small snippet? You
don't appear to be setting $C or $G. Could you post a larger code dump
please?
-Sam
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
$E= "$C*$G";
Should be:
$E = $C * $G;
Never use quotation marks when doing math. Quotation marks are used
for strings. Hope that helps.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
The reason for this is due to the variable "$action" not having any relation
to the action. Therefore, you should use the following if/then statement:
if ($submit !== '') {
// STATEMENTS
}
The "submit" name/value pair variable passed via your form is a named
variable that possesses the value
Hi Rinku,
One problem I see is that the HTML tags appear to be off... Your HTML is
improperly formatted, which could be causing rendering anomalies to occur,
in addition to the register globals issue which I'll mention shortly. Please
correct your HTML code to read:
YOUR_PAGE_TITLE_HERE
HTML_B
I may be incorrect, but I do not think that by "redefining" the
variable $pic is destroying its old contents. If you are familiar with
how programming works, you realize that the "stuff" on the right side
of the "=" sign is evaluated first, and then assigned to the left side
of the "=" sign. Be
I have tried that and I don't get an error, but I don't get any records
returned either. And I have lowered the search string like you
mentioned. Here's what I tried ( Access syntax ):
SELECT autoQuesID,fldQuesTitle,fldBody
FROM tblFAQ_Question
WHERE LCase(fldBody) LIKE '%$strSearchFor%';
Nic
Kim,
Won't redefining the variable destroy the MySQL Resource, resulting in a
resource invalid error, like he has?
$pic = mysql_query($sql,$connection); //Defines variable
$pic //Redefining variable, dumps old contents = //calling on an invalid MySQL Resource, because it doesn't exist mysql_fetch
Well, your query looked confusing to me, but break it up like this
First :
select
Then, name your coloumns, seperate with commas, or use wildcard for all
*
Define from what table you need to select
FROM database_table
Add some select statements with WHERE
WHERE
and the statements i
Have you tried lowering the fldBody as well? Like:
SELECT autoQuesID,fldQuesTitle,fldBody
FROM tblFAQ_Question
WHERE LOWER(fldBody) LIKE '%$strSearchFor%';
And $strSearchFor has already been lowered, of course.
--Nicole
---
Nicole Swan
Web Programming Specialist
Carroll C
I'm using PHP with ADOdb ( and an MS Access 2000 db ) to write a simple
SQL statement but was running into some case sensitivity issues. Here's
my SQL currently:
SELECT autoQuesID,fldQuesTitle,fldBody
FROM tblFAQ_Question
WHERE fldBody LIKE '%$strSearchFor%';
All I'm trying to do is have the us
Please post the table definition to the mailing list so we can help you
more quickly. Also, is there a table called RuneRunner_1 or are you
meaning to use RuneRunner_1 as an alias?
Odds are, your problem is not PHP related, it's an error in your SQL syntax.
Jon
water_foul wrote:
i fixed those t
Hello water_foul,
what about this?
If you do for the first time: $pic=mysql_fetch_array($pic) it will
work, but the SECOND TIME that you do:
$pic=mysql_fetch_array($pic) it will fail, and thats because $pic
is no longer a resource identificator... and you will get:
> >
Haven't seen that this has been solved yet so I thought I'd throw my two
cents into the fray. First of all, I'd second the earlier suggestion that
you assign your query to a variable. And, second, I'd recommend that you
echo out your query to the browser just before it is submitted to the
database
>Dear all,
>Can you aswer for the Query as follow :
>if(isset(_POST['VARIABLE1']$$(_POST['VARIABLE2'])
>{>print "testing";
>STATEMENTS;
>}
I'm not sure how this is not throwing a fatal error. Why do you have two
$'s in the middle and no $ preceeding variable names?
does this work?
if(isset($
Dear all,
Can you aswer for the Query as follow :
if(isset(_POST['VARIABLE1']$$(_POST['VARIABLE2'])
{
print "testing";
STATEMENTS;
}
Here, even I havent set the value for the variables then even I am getting the output
like "testing".
Can any of you suggest me the sollution for the query
Solved... I needed to find a way to get the latest auto_increment value.
I did this using,
$new_id = mysql_insert_id();
Thanks,
Declan.
Thanks for the suggestions. I have
$TimeSheetID=$_POST['TimeSheetID'];
at the start of the script. However, what I neglected to
thanx guys.
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wednesday 23 June 2004 17:14, Gawie Marais wrote:
>
> > i would like to add the whole query into a text field in the 'history'
> > table, but i get errors when i try to add it... can anyone help ?
> >
> > th
Thanks for the suggestions. I have
$TimeSheetID=$_POST['TimeSheetID'];
at the start of the script. However, what I neglected to mention is that TimeSheetID
is auto_increment, in first table, tblTimesheet.
I will try the other suggestions, and respond with my results.
Thanks,
Declan.
-
On Wednesday 23 June 2004 17:14, Gawie Marais wrote:
> i would like to add the whole query into a text field in the 'history'
> table, but i get errors when i try to add it... can anyone help ?
>
> this is the error :-
>
> Invalid query: You have an error in your SQL syntax near '2004-06-23
> 11:0
hi guys,
i have created a 'history' table and would like to insert the 'bare' sql
query into that table just to check who did what on the database...
now, i have this :-
$CustUpdate = "INSERT INTO record SET
recid = '',
customer_code = '$varCustomerCode',
id_reg = '$varId
some tips when inserting data:
instead of inserting into the the table, do some debugging,echo the insert
string and check if:
1- all string fields are between single comma ('field_name').Numéric fields
do not need single comma;
2- all not null fields are present in the field list;
3- you're
Water_foul wrote:
> i fixed those things and it didn't fix it :( :( :( :( :( :( :( :( :( is
> there a icq chatroom for php?)
> "Shahmat Bin Dahlan" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Your SQL statement:
>>
>> 'SELECT Rune, username FROM RuneRunner
>> RuneR
25 matches
Mail list logo