Hi,
I didn't even think PHP would do anything until I just tried it.
?php
for ($i = A; $i = Z; $i++){
echo $i . br /;
}
?
outputs:
A
B
C
X
Y
Z
AA
AB
AY
AX
YA
YB
YY
YZ
Why it continues after Z is not clear to me, and why it doesn't continue
until ZZ isn't either.
In the second loop you do an array_shift($entry) which should be
array_shift($all).
Perhaps a foreach loop would be easier:
?php
foreach ($entry as $value) {
$update = UPDATE accounts SET ctime=NOW() WHERE id_sys=' . $value.
';
$results = mysql_query($update, $Prod) or
Can you send the query and some code that you're using? You probably want to
loop like this:
while ($row = mysql_fetch_assoc($cursor)) {
echo $row{case_note} . br /;
}
Jos
-Original Message-
From: John R. Sims, Jr. [mailto:[EMAIL PROTECTED]
Sent: 17 May 2005 03:07
To:
Hi,
Instead of doing a SELECT *, specify the fields that you require. Allthough
you may think the rows are exactly the same, one might be empty () and one
null which is not the same.
You are more likely to get the result that you need if you specify the
fields:
SELECT DISTINCT somedata, rev,
What are you trying to connect to? Do you have a webservice on the second
domain? Is it a database - and if so, which?
-Original Message-
From: JeRRy [mailto:[EMAIL PROTECTED]
Sent: 17 May 2005 08:33
To: php-db@lists.php.net
Subject: [PHP-DB] Connection Question!
Hi,
Okay lets say I
Can you also send us the output generated by PHP? Ie the output HTML...
Jos
-Original Message-
From: Ng Hwee Hwee [mailto:[EMAIL PROTECTED]
Sent: 09 May 2005 10:48
To: PHP DB List
Subject: [PHP-DB] R6025 Error
Hi all,
I'm having a problem with a R6025 error. What happened is that I
Hi,
If you expect your variables to be generated automatically, you may find
that newer versions of PHP have that disabled by default - because it's less
secure.
Try to read $_POST{formfieldname} to get your data...
To quickly find out all the post data that you received:
?php
print
mysql_fetch_array will always only return 1 row. $array['town'] won't be an
array but just a text and is therefor interpreted differently.
If you can give us more information (ie data model, output sample) we might
be able to help you a bit better.
Jos
-Original Message-
From: J.
Hi,
Since you're telling mysql Avg(RawData) as Mn the index in $myrow won't be
Avg(RawData), it'll just be Mn.
Try printing the entire $myrow to find out what you're receiving from mysql:
print pre; print_r($myrow); print /pre;
That will show you the keys that you should use.
Jos
2005 16:14
To: Juffermans, Jos
Subject: Re: [PHP-DB] Sorting multidimensional arrays from mysql
I have the data which comes out like this from a select all statement
1, 1510 New State Highway (Rte. 44),Raynham, MA,2767
2, 646 Washington St., South Easton,MA,2375
3, 47 Broad
Hi,
I'd just like to point out that one important option was overlooked: You
could create a SQL query which would read the folders AND the mimetype/icon
info at the same time. This means that you can have your database do most of
the work for you which normally means it's faster.
Rgds,
Jos
As far as I know there is no limit on the amount of variables, however there
is a limit on the length of the URL including query (I believe 256
characters).
Normally I would use hidden fields in a form (method POST) for this kinda
stuff.
Jos
-Original Message-
From: [EMAIL PROTECTED]
Hi,
I have a script that needs to connect to two database. Unfortunately, one of
them uses US7ASCII encoding (similar to LATIN1) and the other one uses UTF-8
encoding.
Before I connect to the first one, I set these environment variables:
putenv(NLS_LANG=AMERICAN_AMERICA.US7ASCII);
Hi,
Imagine this code:
?php
$database_connection = ocilogon(username, password, connection
string);
// the actual connection code is slightly different but that is not
relevant to my problem
$postalcode = 3055;
// option 1: paste the postalcode into the query:
-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 20 April 2005 13:40
To: [EMAIL PROTECTED]; php-db@lists.php.net
Subject: RE: [PHP-DB] OCI Binding problem
Sorry, trigger happy. Also try :postalcode in uppercase.
Neil
-Original Message-
From: Juffermans, Jos [mailto:[EMAIL
Juffermans, Jos would like to recall the message, [PHP-DB] OCI Binding
problem.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
);
// this returns the records
?
Somehow Oracle will interpret the :postalcode as a numeric value in this
case, eventhough the column is a varchar. By adding '' || Oracle converts it
to a string.
Jos
-Original Message-
From: Juffermans, Jos [mailto:[EMAIL PROTECTED]
Sent: 20 April 2005 14
If you do "SELECT LEFT(loc1,3) FROM openart_table" the column name in $row
is probably not "loc1". Try this: "SELECT LEFT(loc1,3) AS loc1 FROM
openart_table". Also, after the fetch you can do some debuggin thru this:
?php
$row = mysql_fetch_assoc($result); // change $result
Hi,
I'm afraid I can't help you with the query - I'm used to Oracle which as a
bigger set of SQL commands.
I can help you with your PHP question. If you want to put a variable in a
query, you can add the variable directly into the string:
$sql_query = select zg_longitude from zip_code
Hi,
You could do something like this:
SELECT 'Accounts' as department, Accounts as id FROM mytable WHERE Accounts
IS NOT NULL
UNION ALL
SELECT 'Human Resources' as department, HR as id FROM mytable WHERE HR IS
NOT NULL
UNION ALL
SELECT 'Support' as department, Support as id FROM
Hi,
If I understand correctly, you're using
include/function_gd.php?route_photo=$thumb as image source which is the
script you pasted. If you use a script as image source, the script should
output the image data - not just store the image.
I'm not sure what you're trying to do but if you have an
-Original Message-
From: Craig Hoffman [mailto:[EMAIL PROTECTED]
Sent: 06 April 2005 18:12
To: php-db@lists.php.net
Cc: Juffermans, Jos
Subject: Re: [PHP-DB] One more GD ? -- filename
Hi Jos,
I understand what your saying. The problem is all the image names are
listed in the DB
i Rene,
So far, I have found a few mistakes in your SQL:
$query .= OR `variant` LIKE '%.$_GET['search'].%';
Why do you have backtick-quotes around variant? Know that backticks are used
to call system commands. You also use these backticks in the ORDER BY lines.
My guess is the backticks
Hi,
Martin Norland wrote:
MN I'm afraid phrasing a question multiple ways over a course of days tends
MN not to have much success. In an effort to avoid populating google with
MN just the question, I will give to you what I would try.
I understand your point but since I wasn't getting any
Hi,
I'm trying to connect to an Oracle database (using ocilogon) which is in a
different country and connected to our serverfarm via a VPN (the database
has no public access). Unfortunately the VPN or the database is not always
available. In those cases I will present the visitor with a page
Sorry to use this, but I don't know if my messages are arriving...
Can someone (only 1 please) reply that my message was received?
Jos
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Please send the code that you used with the hrefs so we can see where the
error occurs. Tell us what line the error occured (and what line in your
copied code that is).
Jos
-Original Message-
From: John Burroughs [mailto:[EMAIL PROTECTED]
Sent: 21 March 2005 03:29
To:
Hi,
Some of our scripts that generate customer-facing pages, need a connection
to a database. The problems is that the database is in Norway and -
allthough we have a VPN setup - the connection isn't always available.
In case the connection cannot be made, we can redirect the customer to a
28 matches
Mail list logo