e the following
array(2) { ["beans"]=> string(16) "Ethiopian Harrar" ["quantity"]=>
string(1) "3" }
Notice that beans and quantity are in double quotes.
From now it should be east to fix ;)
graeme.
W Roothman wrote:
Wizards,
I am VERY new to PHP,
Just a thought, Could you use the set data type rather than a text to
store your multiple selections?
graeme.
Stuart Felenstein wrote:
It's more then keywords actually. There are 3 list
boxes, one for states, one for industries and one for
taxterm., so 50 states , industries, something li
Hi,
Rather than writing a recursive function I'd suggest that you create a
menu class and store each record as an object of the class. The menu
class will have variables of id, parent, title, children, and tree. The
children will be initialised to 0 and tree will be initialised to 1. You
will n
nsert and the occasional re indexing)
graeme.
Evan Morris wrote:
This is more a process question that is not specific to PHP, but maybe
someone can help me.
I have a text file containing strings. The text file is pretty massive,
about 895 MB. I need to load the words in the text file into the databa
roy();
However my problem is that if I recreate the session in the same script
the session file is created with exactly the same file name and creation
time. Making me believe that the session is held in cache somewhere
graeme.
Chris Payne wrote:
Hi there everyone,
I need to destroy a session in
You might want to use:
mysql_num_rows -- Get number of rows in
result
Stuart Felenstein wrote:
I want to send back a message when no matches are
found on my search page. Basically "No matches
found". I assumed that mysql_fetch_assoc would be the
determining factor on whether any rows will com
Try using the if statement.
Ben wrote:
Morning all.
I attach a document, which is used to send an email with attachments. What I
need to do though, is if a form field is left blank, then that tag is not
included in the email. Any clues anybody?
It is vital that no information is sent for blank fiel
I suspect that your $submit is not set up, try the following echo
statements before the if statement:
echo "--$submit--";
echo "--$_POST["submit"]--";
amol patil wrote:
hallo ,
i have wriiten simple php script , below.
created databse "dollar1_allinfo" with table 'totalinfo'
but on clicking submi
n
you are expecting to enter the if($submit) clause.
I hope that clarifies it a bit.
all the best,
graeme.
amol patil wrote:
hallo,
i wrote this
echo "Submit = $submit"; before 'if statement'
but , the sentences in echo statements are executing on same pages , showing
o 'Also the name attribute is the variable name that will be held in
the $_POST variable';
?>
in file Page2.php
\n";
echo 'The submit variable is held in the $_POST variable';
echo $_POST["submit"];
echo "To find out what has been POSTed use the var_dum
Hi,
Wild guess but does the original WHILE AND have two spaces between the
WHILE and the AND? us an echo before and after and count the number of
spaces. But yes it would be possible to avoid this with the judicious
appearance of an if statement.
graeme
Chris Payne wrote:
Sorry if this already
Hi,
You have:
$query example = SELECT description from cpProducts where category='39
47 48 172'
don't you want to add a logical operator such as OR, possibly AND
$query example = SELECT description from cpProducts where category='39
OR 47 OR 48 OR 172'
graeme.
Jason
hat
are produced. Maybe is is a double digit and two spaces trip[le digit
and one? Without an example of the data and what is produced it's hard
to help.
graeme
Jochem Maas wrote:
graeme wrote:
Hi,
You have:
$query example = SELECT description from cpProducts where
category='39 47
Hi,
To stop the return receipt dialog appearing in Tbird...
Tools... Options... Advanced... Return Receipt and select "Never send a
return receipt." Or you can choose some of the other selections.
graeme
Jochem Maas wrote:
Jason,
can you please turn off the return receipts on emails y
cho $id
?>
method=post>
If you run this and don't get the session ID being maintained then there
would appear to be some problem with your set up but we'll probably
require more info OS php version etc.
graeme.
Henk Jan Wils wrote:
Hi,
My session only seems to work when
client. (that
should allow for more than one client entering data at the same time,
although you may want to properly think that scenario through)
graeme.
Wendell Frohwein wrote:
First of all I would like to thank anyone who lends a hand in this
matter. Here is what im working with. Redhat 9, PHP
It appears as plus sign and numbers on my computer.
graeme.
ioannes wrote:
It appears that the code below in short has the following problematic strings:
++90 ++90-212- gives ï ï212- on my test page below: error2.htm. A clue might
be that a search on google turns up Arabic unicode, and the
with a u on top.
I suspect that it is an issue with the encoding. Have you tried to state
the encoding to use in your HTML?
graeme
ioannes wrote:
When I copy the php page and paste in a new page, upload that, and
view with the same ? variables, it works (the css works and no js
errors), however
Can you do what you require by grouping by your type. setting a count
field and then a where count > 3? However if you then need to know the
details from the three consecutive fields then I don;t think it can be
done in SQL so you'll need to revert to php.
graeme
Jochem Maas wrote:
Set your select to group by userid, select on min(tourney.start) value
and max(tourney.start) value where closed = 1 etc.
graeme.
[EMAIL PROTECTED] wrote:
I have an interesting problem I'm trying to solve. Right now, I'm keeping
track of sessions starting
and ending times with a PH
Sorry that should have been max(tourney.finish) :-[
graeme
graeme wrote:
Set your select to group by userid, select on min(tourney.start) value
and max(tourney.start) value where closed = 1 etc.
graeme.
[EMAIL PROTECTED] wrote:
I have an interesting problem I'm trying to solve. Right now
MySQL result. Try adding the following:
if (!$sql_query) {
die('Invalid query: ' . mysql_error());
}
graeme
Earl Clare wrote:
Hi ya'll,
I am lost as to why I am getting this error in my script. Can anyone kindly
explain why this is so.
Warning: mysql_num_rows(): supplied argument
try...
$z = array('foo' => array('bar'), 'dis' => array('dat'));
foreach($z as $key => $value)
{
echo "$key $value[0] ";
}
graeme.
Yemi Obembe wrote:
Hi folks.
wat can be done to dis:
$z = array('foo' => array('bar'
or even...
$z = array('foo' => array('bar'), 'dis' => array('dat'));
while (list($key, $val) = each($z)) {
echo "$key $val[0]";
}
You need to remove the superfluous close bracket on after bar, and the
val is an array hence $val[0] to get the
Can you post your code up and tell us what system you are using?
cheers,
graeme
Balwant Singh wrote:
dear bastien
thanks for the reply... but i checked it again but it is giving only
1970-01-01. is something else needs to be done.
with best wishes
balwant
On Mon, 2005-01-31 at 19:46, Bastien
The code works fine on my system, so what version of php are you using
and what is your operating system?
graeme.
Balwant Singh wrote:
i just copy your code and paste into a test file.
?>
with best wishes
balwant
On Tue, 2005-02-01 at 10:33, Bastien Koert wrote:
pls post relevant c
what output do you get from the following?
";
$date = date("Y-m-d",strtotime($timestamp));
echo $date ."";
phpinfo();
?>
graeme wrote:
The code works fine on my system, so what version of php are you using
and what is your operating system?
graeme.
Balwant Singh wrot
I like the idea of a mysqli_queasy() function. Maybe it would allow you
to sumbit SQL statements that don't conform to any standard? ;)
graeme.
Bastien Koert wrote:
the second error is a misspelling in the mysqli_query command
bastien
Call to undefined function mysqli_quesry() in C:\A
file.
graeme.
Gael Lams wrote:
Hi all
I use the classic following rows to connect to a mysql
database. I always put $passsword in clear in the php
connection file and I wonder whether there is a way to
have it in md5 so that someone reading the file could
not use it to connect to the db. I googled a bi
For more efficient code try the explode() function (You really only want
to use the regular expression functions for complex pattern matching,
looking for a comma is about as simple as it gets so use the standard
string functions)
explode (',',$Agent_Rep);
graeme.
Rasmus Lerdorf wr
Try putting your print "\t$col_value\n" immediately after the foreach...
foreach ($line as $col_value)
print "\t$col_value\n";
remember to remove teh semi-colon after the foreach line.
graeme.
chintan wrote:
as usual my database is in mysql
and there are lots of rec
From memory earlier versions of MySQL don't support subselects. The
latest (and greatest) does so you may want to check the version you are
using - I can't remember when it was introduced, I have since switched
to PostGreSQL...
all the best,
graeme.
Juffermans, Jos wrote:
Hi,
I&
1st Get your SQL to ORDER BY points DESC
2nd use PHP to get the details on row at a time and display the results
in an HTML table.
The specifics will depend on what your table looks like, for example if
you don't have a points column then you may need to get SQL to calculate it.
graeme.
Get those with transaction into a php array
Get those without transaction into a php array
Then use array_diff() (or one of its variants)
graeme.
jinxed wrote:
I am still new to this, but I turned the manual upside down, or at least I
tried.
I am designing a payroll application by which payslips
Are you looking for the sprintf() function?
graeme
mayo wrote:
I need to be able to format data.
Printf() is perfect because I need a certain amount of characters (30
for address).
However I need this formatted data to be inside a file that's fwrite()
and then FTPed to a distributo
ed an error to occur. The example in the docs had the new lines
and tabs escaped so I tried that as well with addslashes()
$text = file("test.sql");
$db = pg_connect("host=localhost dbname=graeme user=graeme");
pg_exec($db, "COPY test FROM stdin");
foreach($text as $lin
to occur so it's
obviously something in the setup.
My sqlhosts line is 'demo_se seipcpipdev sqlexec'
and the ifx_connect line is 'ifx_connect("stores7@demo_se", "testuser",
"mypasswd")'
Cheers,
Graeme
--
PHP Database Mai
comp.databases.informix on google/deja on shadow and PAM etc
will reveal the problem. Apparently there are workarounds for this but I
haven't found the, yet. I suspect they will require surgery to something
important :)
Cheers,
Graeme
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Evening all, I've written a script which sends emails, there is no problem
with that. I was wondering how I can check for email bounces, anyone know
how to do that?
Cheers,
G :)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
please delete this
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I've tried all sorts of possibilities. path to tnsnames.ora is correct.
> I've even tried with ODBC but when i used it with php, i get
> "server refused
> connection". However, ODBC test was successfull and other apps
> can work with
> it.
Can you give us the exact
alter some Oracle defaults, it may well be too late because
that option has already been set then the module was loaded (i.e. when
Apache starts).
Cheers,
Graeme
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
od.
Thank you in advance for any help - I'm lost!
Graeme :)
Public Sub House()
On Error Resume drink
If Pint.empty = True Then
Pint.refill
Else
Pint.drink
End if
stomach.add Pint
MsgBox " I've had " & stomach.
ad and insert that into the
Lookup table.
Any ideas how I can just extract this value? I'm also not 100% clear on
what "mysql_fetch_assoc" does, can anyone explain it?
Cheers in advance,
Graeme :)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
27;,
Password = '$Password',
GiftWrapping = '$GW'";
}
Thank you in advance for any help.
Graeme :)
Public Sub House()
On Error Resume drink
If Pint.empty = True Then
Pint.refill
Else
Pint.d
Mihail, thanx for your advice, I've got it going now ! :) Thank you !
Richard, your points were valid, the HTML code with the slashes was just a
copy n' paste from a PHP script and the comma I think I deleted by accident
so its all sorted now.
Thank you again!
Graeme :)
- Origin
y" can anyone point me in the right direction?
$number=count($GiftWrapping);
for($a=0;$a<$number;$a++)
{
echo $GiftWrapping[$a];
if ( empty( $GiftWrapping ) )
{
$GW = 'N';
}
INSERT INTO DB CODE HERE
GiftWrapping = '$GW'";
}
Cheers in advan
Mihail, do u mean something like this?
$pick[$i] is Checked"; }
}
?>
Painting
Plumbing
Electric
Cheers,
Graeme :)
- Original Message -
From: "Mihail Bota" <[EMAIL PROTECTED]>
To: "Micah Stevens" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROT
Hi all, thanks for all your replies, I got the problem with checkboxes fixed
:)
Cheers,
Graeme :)
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Graeme McLaren" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, October 28, 2002 3:53 PM
Subjec
$message = "If you get this then age3.php works"
$message = "If you get this then age3.php works";
mail($sendto, $subject, $message);
}
}
Cheers,
Graeme :)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t now.
Thanks for your advice.
Graeme :)
On Sat, 2002-11-02 at 20:41, Jason Wong wrote:
> On Sunday 03 November 2002 04:26, Graeme McLaren wrote:
> > Greetings list members. I've written the code below as part of an
> > automatic email script. The problem with this is it
ed to use $Year, the case insensitivity didn't seem to make a
blind bit of difference. I've corrected it now and the script runs as
it did previously.
Did PHP just correct this at run time? Anyone know why this worked?
Cheers,
Graeme :)
P.S. Seabird: I had a quick look at your si
Hi everyone, I think I've got the problem sorted, I'll soon let y'all
know if it doesn't work !
Cheers,
Graeme :)
On Mon, 2002-11-04 at 21:47, Graeme McLaren wrote:
> Hi, Anyone know how I can use two mysql_fetch_array() functions similar
> to the code below? I
umped with this one,
Graeme :)
$query = "SELECT Name, Address FROM users";
$query2 = "SELECT EmailAddress From Members";
$result = mysql_query($query);
$result2 = mysql_query($query2);
while($details = mysql_fetch_array($result) and $Email =
mysql_fetch_array($result2))
{
work with one mysql result per connection at
a time". Can you explain a little more about that please? I don't think I
fully understand what you mean.
Cheers,
Graeme :)
- Original Message -
From: "Josh Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
S
ue of your primary key
field.
That should do it, my postgres is a bit rusty tho.
Cheers,
Graeme
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Do you get an Oracle error code back?
What version of PHP are you using?
Cheers,
Graeme
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf
> Of Ludo
> Sent: Saturday, 23 June 2001 1:31 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-
(and maybe ODBC?) syntax. Using square brackets will
work on most things including table names and field names with spaces in them.
This will work fine
SELECT [table space].[field space] FROM [table space]
It doesn't mean that you should go around putting spaces in your database
obje
seful for pulling columns out of Oracle so you don't need
to make calls to ociresult() all the time. I actually don't see much benefit
over using fetchstatement()
Cheers,
Graeme
Cheers,
Graeme
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
seful for pulling columns out of Oracle so you don't need
to make calls to ociresult() all the time. I actually don't see much benefit
over using fetchstatement()
Cheers,
Graeme
Cheers,
Graeme
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
er, ROWNUM does not listen
to sorting which makes life amusing.
One option is to try a query like the following:
"SELECT * FROM (SELECT field1, field2 FROM table WHERE id>10 ORDER BY field1
DESC) WHERE ROWNUM<11"
which gives you 10 rows, but still leaves the question of paging
> machine under Linux(RH), what have to be done to make my PHP work with
> the
> DB.
Windows is a slightly different beast. Normally the environment stuff is
handled in windows and you don't need to setup anything with putenv. Use your
Net8 Configuration assistant which is part
would certainly stop you having to rewrite the query.
As David pointed out though, using TO_CHAR and it's mate TO_DATE is by far
the best way to go.
Cheers,
Graeme
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
eNo
and emp2.EmployeeNo = '$EmployeeNo'");
if(mysql_num_rows($query) == 1)
{
mysql_query("update emp2 where emp2.id = '$SomeValue'");
}
else
{
mysql_query("insert into emp2 set X = '$X'");
}
hope this helps,
Graeme :)
- Original
Line1 = str_replace(" ", "+", $AddressLine1);
echo "First Line Of Address: ";
Cheers,
Graeme :)
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
symbols with a space " " only the
part up to the first space is displayed back to the user.
Any ideas?
Cheers again,
Graeme :)
- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 30, 2003 7:12 PM
Subject:
Hey everyone, the following query and code works fine but I can't understand
why I can't echo the $Date variable. I guess it doesn't work fine then :(
Any ideas ?
G :)
$TheDate = mysql_query("select DATE_FORMAT(DateOfOrder, '%d, %m, %Y') as
date from Orders Where Orders.ID = '$TransID'");
whil
67 matches
Mail list logo