What am i doing wrong with the script below? What i am trying to do is check
whether the newtest field has a 0 or a 1 value then redirect the user to
a different page based on the answer.
I am then trying to add 2 to the value in the points field of my database
and then to set the newtest field
Hi Steven,
On Sunday 12 January 2003 23:58, Steven M wrote:
include 'db.php';
$result = mysql_query(SELECT newtest FROM users WHERE 14 = '$0');
list($number) = mysql_fetch_row($result);
Here you are closing your conenction to the MySQL-Server:
mysql_close();
if($number==0)
But here you
Hi Johannes
Thanks for the help. I have taken out the mysql_close() and it looks like
it is submitting ok (ie no error messages) but it is not updating the
database when i check it. Any ideas?
Thanks.
Steven
Johannes Schlueter [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP/MySQL help?
Hi Johannes
Thanks for the help. I have taken out the mysql_close() and
it looks like it is submitting ok (ie no error messages) but
it is not updating the database when i check it. Any ideas?
Thanks.
Steven
Johannes
I thought i read somewhere that you could refer to the field by number. Was
i wrong? It doesn't seem to make a difference anyway. It still doesn't
work. Here's the code with words instead of numbers. I'd be grateful if
you could let me know if there are any obvious errors.
Best wishes.
: [PHP] PHP/MySQL help?
I thought i read somewhere that you could refer to the field
by number. Was i wrong? It doesn't seem to make a difference
anyway. It still doesn't work. Here's the code with words
instead of numbers. I'd be grateful if you could let me know
if there are any
Oops...many thanks for that. Sorry, i am extremely new to this.
Best wishes.
Steven M
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
There are a few PHP calendars:
http://www.cascade.org.uk/software/php/calendar/index.php
for example, that you can start from. It should be relatively easy then
to write a small table that contains just one field:
Date (datetime)
All you do is insert a row in the db for each day that is
Hi All
I have been trying to write a database and scripts for a calendar that shows which
days are booked and have failed at each point.
What i would like it to do is to show a calendar which have the dates that are booked
in a cell which are colour coded (say red) when it is unavailable and
Hi,
from this command line test:
select imglocation,height,width from img where imgname='alfstag1'
it looks to me like your imgname field is *characters* rather than *numbers*.
when ever I'm doing something like this (eg WHERE firstName=justin), I
do it with a LIKE statement, rather than with
On Wednesday 31 October 2001 02:32 am, you wrote:
So, I'd recommend giving that a try. From my understanding (limited) of
MySQL, use = in the case of $id=2, and LIKE in the case of firstName
LIKE justin.
Um...you *can* do that, but I don't think you want to. Using LIKE means that
MySQL has
.
Thanks to Kurt and Justin for the help offered on this simple (now that it
is working) problem.
I do not know where my stumbling block was but after a good nights rest and
some coffee this morning I have this and the GetImageSize function
incorporated.. I will list the code incase someone
.
Thank you for the heads up on using like. I was wondering since there will
be 2 similar variables from each page var1 var2 (identical except for the
number). I programmed in DataFlex for about 6 years back in the late 80's
early 90's but have not done anything db wise in over 8 years I
On Wednesday 31 October 2001 07:45 am, turtle wrote:
img src=? echo $imglocation ? ? echo $size[3]; ?
Glad we could help. Also, you can re-write the above so you don't have to
define two sets of ?php ? tags by doing the following:
?php
print img src=\$imglocation\ $size[3];
?
Not a big
.
Thank you Kurt,
The day for the server to be move from Cal to Fla is the 31st (today)
I would image that it is somewhere in transit at the present time...
Will send you an email with another address you can respond to...
Thanks for all of your help
Mike
Kurt Lieber [EMAIL PROTECTED]
I am trying to pass a variable to a popup window, to do a search in a
database, and display an image based on the results... Here is what I have
messed up so far (this is the 1st time I have used php/mysql no
userID/Pswd on local host)
The script that passes the variable (variable does
On Tuesday 30 October 2001 10:13 am, turtle wrote:
?
$link = mysql_connect('localhost')or die (Could not connect);
mysql_select_db('img760')or die (Could not select database);
$query = select ('imglocation','height','width') from img where
imgname=$getimg;
$imglocation = 'imglocation';
.
No reading that section of the manual did me no good. I do not understand
other than I cannot store the results as a variable.
Is there any of what I have done that is usable?
A recommendation for a book that covers this would be helpful... the manual
on this area is way to abbreviated for
On Tuesday 30 October 2001 11:58 am, turtle wrote:
No reading that section of the manual did me no good. I do not understand
other than I cannot store the results as a variable.
yes, you can.
Is there any of what I have done that is usable?
yes, there is. see below. It's probably not
.
It is starting to make sense. I see the correlation between the manual
example and the code you show. Surprisingly (and equally confusing) the
book I have also uses a while loop with mysql_fetch_array to display a list.
The getimg variable comes in from the javasript function on the other
On Tuesday 30 October 2001 02:53 pm, you wrote:
It is starting to make sense. I see the correlation between the manual
example and the code you show. Surprisingly (and equally confusing) the
book I have also uses a while loop with mysql_fetch_array to display a
list.
You would use a while
Kurt Lieber
You would use a while loop if/when you have multiple records to retrive.
From your original code example, it seemed as though you would only have
one
record. (though, for safety's sake, you should code a LIMIT into your sql
statement)
Yes I only need one image location with
22 matches
Mail list logo