Watch out, though, as "direct date math" can really screw ya over
when it Daylight Savings changes (if you're not in a daylight savings
area, you're okay.) Best bet is to use getdate() to build up the array,
modify the array elements, then mktime it. If you just add seconds
you'll get odd result
Sorry, that was vague. ODBC is a standard of connectivity
and IS supported by the AS/400 platform.
With that said, if AS/400 has ODBC support and PHP has
ODBC support then the two can "talk."
-Mike
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PR
You need to have "keys" in each table to join them together.
Once you have those "keys" in place, you can match the keys
across the tables and use a WHERE clause to filter the results.
'Luck!
-Mike
- Original Message -
From: "José Moreira" <[EMAIL PROTECTED]>
To: "Php-Db" <[EMAIL PROTEC
okay, couple of questions in this one... =)
First...
is shorthand for if you care.
With a there is no "value" attribute.
Your "UPDATE" call via sprintf() is okay for the parameter passing,
but you're missing single quotes around the text values.
UPDATE test SET (number = 1, name = 'th
You're going to have to rip open the MS-specific format and
handbuild (or script) your PHP to custom-build that format with
the correct data fields. While it can be done, it's a good bit of
time and energy.
-Mike
- Original Message -
From: "Dib, Walid (MED, Stagiaire GEMS)" <[EMAIL P
Make sure you're exec'ing against the correct database with identical schema.
Different MySQL versions? Schema? Permissions?
var_dump() and cut'n'paste onto the server to make sure the query DOES
run, then look for remote DB connection issues, permissions, database, etc.
Are there multiple "n
There's a long thread somewhere in the archives of PHPBuilder.com
in regards to getting DB2/PHP to work on an AS/400.
-Mike
- Original Message -
From: "John Lim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 25, 2002 12:01 AM
Subject: [PHP-DB] Re: DB400 on AS/400
> H
One large PHP block is more efficient than multiple small blocks of
php.
It's a tradeoff of "multiple invocations of the parser" versus having
the parse run through (and ignore) normal text. We have run tests
inhouse that validate the performance difference is fairly small, but
it does exist.
I'm sorry, brainfart.
Don't exec(), eval().
Apologies.
-Mike
- Original Message -
From: "Matthew Tedder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 4:00 PM
Subject: Re: [PHP-DB] PHP in Database Fields..
> On Monday 24 June 2002 09
exec() the query results.
-Mike
- Original Message -
From: "Matthew Tedder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 2:31 PM
Subject: [PHP-DB] PHP in Database Fields..
>
> Question:
>
> I want to put PHP code into database fields holding HTML text,
Just a quick follow up...
from http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.1
"When there is only one single-line text input field in a form, the user agent
should accept Enter in that field as a request to
submit the form. "
and a random link...
http://ppewww.ph.gla.ac.uk/~flav
- Original Message -
From: "Cosby, Christopher" <[EMAIL PROTECTED]>
> I don't want to start a tangent here, but the most accepted way for
> generating HTML with PHP is to NOT generate HTML with PHP. Thus, the
> original code should be written like this:
Huh? ".. most accepted way for g
MySQL doesn't support subselects.
Look up mysql_insert_id(). It'll return the ID of the last inserted record.
Or just break out the second INSERT statement into one "SELECT"
and then the actual INSERT.
-Mike
- Original Message -
From: "Christine Clerc" <[EMAIL PROTECTED]>
To: <[EMAI
SQL JOINs...
http://www.mysql.com/doc/J/O/JOIN.html
-Mike
- Original Message -
From: "Noah Spitzer-Williams" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 4:21 PM
Subject: [PHP-DB] check two tables at same time?
> hey guys,
>
> im trying to figure out a
Because it's not $s in the context of a printf() call. It is %s to denote a
string replacement.
-Mike
- Original Message -
From: "Matthew Crouch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 12:41 PM
Subject: [PHP-DB] got it, thanks
>
>
> Seth Yount wrote
Hmm...odd. I guess their %s (yes that was a typo) looks for a space
as a delimiter and not the specified next one.
Easiest workarounds off the cuff...
1) sscanf() to get the bulk of the data out, then regex out the %s string.
2) eregi_replace() Jun with the numeric
3) Dump it as numeric inste
Your questions are far too vague and XML/XML:Schema/XSLT etc
are far too complicated to explain without definitive focus'd questions.
XML allows you to do whatever YOU want in whatever format
YOU want.
Best help I can give is this...
http://www.w3.org/
'Luck
-Szii
- Origin
in `my.cnf' or just exclude a set of
databases with replicate-ignore-db.
--
Two-way replication is not supported yet.
http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Replication
me basic info on SELECTs.
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#SELECT
'Luck
-Szii
- Original Message -
From: "admin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 20, 2002 5:48 PM
Subject: [PHP-DB] JOIN statement not pro
I'm sorry, I'm having an "off day." This'll be my last post on the
subject. *sigh* Apologies up front...
while($website = mysql_fetch_array($result))
{
$text = "You can go here: " . $website['originalDomain'] . " and
find information
;information";
> }
The above code doesn't even require an eval() call.
Apologies for the confusion..
-Szii
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Bogdan ROMAN" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, May
// command line interface.
You can also use the mysql_error() and mysql_errno() calls
to see what went wrong.
-Szii
- Original Message -
From: "cin" <[EMAIL PROTECTED]>
>
>
> mysql_connect("localhost", "test", "t
foreach($website = mysql_fetch_array($result))
{
$text = "You can go here: and find
information";
eval($text);
}
You get the idea...
'Luck
-Szii
- Original Message -
From: "Bogdan ROMAN" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monda
$escdata = addslashes($data);
UPDATE
Blabla
SET
value = '$escdata'
WHERE...
Make sure you use addslashes, though. It's important.
'Luck
-Szii
- Original Message -
From: "Hadmut Danisch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Se
SELECT DISTINCT L.*
from data.languages L, data2.user U
WHERE L.id IN (U.language_1, U.language_2, U.language_3)
order by name;
I believe the IN clause is a shade faster than multiple ORs, but
I'm not 100% sure.
'Luck
-Szii
- Original Message -
From: "andy" &l
"Delete from" does not work with multiple tables, AFAIK..
-Szii
- Original Message -
From: "andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 03, 2002 2:02 AM
Subject: [PHP-DB] sql querry problem
> Hi there,
>
> I do have
AddSlashes() or AddCSlashes()
-Szii
- Original Message -
From: "Paul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 02, 2002 4:11 PM
Subject: Re: [PHP-DB] Re: Spaces Problem php & mysql
> On Thursday 02 May 2002 10:10 am, you wrot
e has pooling capabilities,
so it's not really any overhead to "reconnect." If no pooling is available, then you
limit yourself (and your webserver) to a single connection. (Will kill your
performance.)
HTH.
'Luck
-Szii
- Original Message -
From: "Shaun Johnston&qu
le ( name ) VALUES ( '$name' )
Make sure you escape out all single quotes in $name.
$name = " This is Paul's field."
.
.
.
INSERT INTO table ( name ) VALUES ( '$name' )
Will fail, because you have VALUES ('This is Paul');
Post the full value o
I believe it's because $CLIENTID is not set at ALL before you
register it. (ie, isset($CLIENTID) would fail) Therefore it cannot
register the variable...there's nothing for it to register or track.
Try...
$CLIENTID = "";
session_register("CLIENTID");
$CLIENTID="SOMEVALUE";
- Original Mes
When you build the list up, originally, you'll NOT put "selected" on Choose City, but
move it to "Alexandria."
-Szii
- Original Message -
From: "its me" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 26, 2002 1:39 AM
Su
put in a "var_dump($sql);die();" right after
$result = mysql_query($sql);
Then copy/paste it into mysql's command line util, and see what
you get.
-Szii
- Original Message -
From: "Neil" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thu
hehehe, you recoded PHP to reconnect to MSSQL, but you forgot
to redo your connection stuff. "Sybase error:" means that you're
connecting to Sybase and not MSSQL. *wink*
'Luck
-Szii
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECT
years old by now,
and I'm not sure if it ever changed, or what the
status is currently.
'Luck!
-Szii
- Original Message -
From: "J. Wharton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 8:51 AM
Subject: Re: [PHP-DB] User g
Well, that looks like a problem within the findLoginType()
call. Since it's not been included, it's hard to help you. :)
'Luck
-Szii
- Original Message -
From: "J. Wharton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 23,
ooks like you were trying to
do string appends, but they're not being used
correctly
'Luck
-Szii
- Original Message -
From: "Evans, Josh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 23, 2002 11:26 AM
Subject: [PHP-DB] please help!
This is more of a MySQL question, but you can set the column default for
the auto_increment column to something other than 1.
Look up the "SET DEFAULT" clause of the table create / alter table
calls.
-Szii
- Original Message -
From: "Dan Swensen" <[EMAIL PROTEC
uot;])) &&
(sizeof($result["col1"])))
{
// do stuff here
}
Remember that the above SEQUENCE is important. If you deviate from it,
you may get "unknown variable" or other error messages.
-Szii
- Original Message -
From: "Prodoc" <[EMAIL PRO
is no match.
'Luck
-Szii
- Original Message -
From: "Peter Westergaard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 19, 2002 2:46 PM
Subject: [PHP-DB] Complex (for me) table "join" - help please?
> I'm trying to perform a &qu
";
// Now fopen() the file, fputs the $output, and fclose() the file.
**
http://www.php.net/manual/en/function.fopen.php
http://www.php.net/manual/en/function.fputs.php
http://www.php.net/manual/en/function.fclose.php
Party on!
-Szii
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The easiest way...
> $getlist = mysql_query("SELECT distinct Writer FROM stories");
> echo " \n";
echo "Search All";
> while ($row = mysql_fetch_array($getlist)) {
> echo ' '.$row["Writer"]."\n";
> }
> echo &q
collector do the work
periodically instead of cleaning up each session individually.
Check out http://www.php.net/manual/en/ref.session.php
'Luck
-Szii
- Original Message -
From: "Matthew Tedder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 3
In the source directory, there's a "myisam/ftdefs.h" file. You can change
the
min word size there.
Note that you will have rebuild it, and reinstall. Usually via "make/make
install."
Also you have to rebuild the indicies. Easiest way is to drop and readd
them.
r sure.)
If you need a consolodated system for the whole company, well, Oracle wins
that hands down.
If you just need a super fast lightweight database, OpenSource.
For everything else, DB2.
And if you need a kick-arse track-anything-anywhere-anyhow system, look at
Camstar Systems,
which will ha
If you call it on two different links, it's seems to modify both
links. Almost like it's global
*shrug*
-Szii
- Original Message -
From: "Paul Burney" <[EMAIL PROTECTED]>
To: "Szii" <[EMAIL PROTECTED]>; "php mailing list" <[EMA
to find anothe solution.
Anyone have any ideas/thoughts?
Thanks.
-Szii
--
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]
This is not VB - this is better. Probably want to name all of your text
fields something
similar, since they'll be mixed in with the drop downs, radio buttons,
etc...
Check $HTTP_POST_VARS and $HTTP_GET_VARS in your form's target.
-Szii
- Original Message -
From: "Pet
your friends know that you're a PHP/web coder looking for
work.
It's amazing how many people know people that know people and you end up
with work. 8-)
-Szii
- Original Message -
From: "David Balatero" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent:
e-quotes if you're more
comfortable with them
$str .= "echo \"Done!\";"; // note that it's got a ; INSIDE the
string...it's PHP in there, after all
eval($str);
If you wanted to pre-generate it, I don't see any reason why you couldn't
addslashes()
the co
ID = 4;
or if you wanted to check multiple groups,
SELECT UserID from GroupMemberTable WHERE GroupID IN (4,2,3);
The map table may get huge depending on the number of users/groups,
but it's a possibility.
-Szii
- Original Message -
From: "Doug Schasteen" <[EMAIL PROTECTED
o)) // It's checked, therefore it's set - if it's not
checked, it's just not set.
{
echo "Set\n";
}
else
{
echo "Not set\n";
}
}
This will give you "Set"/"Not Set" lines 80 times.
G'luck..
-Szii
- Origina
Sorry, last message was a little vague.
Your SQL will fail because of the ',' after the SET clause.
Therefore affected_rows shows 0, and inserts a new row.
Then when you match with the LIKE clause, it's going to match
multiple times.
Miles, you were SO close with #2. =)
-Szii
Remove the comma after the "SET" clause?
-Szii
- Original Message -
From: "Miles Thompson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 3:50 PM
Subject: Re: [PHP-DB] mySQL Addition Problem
>
> Dammit, that code lo
Haven't pounded it yet, but it seems to work...
-Szii
- Original Message -
From: "Jimmy Brake" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2001 9:58 PM
Subject: [PHP-DB] 'the missing character' YIKES
> I forgot to detail the p
Export as a comma-delimited file, explode() the file one line
at a time along commas, and use insert via normal methods.
Not sure if MySQL has a parser for comma-delim (probably
does) but this way you have more control over how it goes in.
-Szii
- Original Message -
From: "Ga
f() clause that inc's your start by one, and then adds 3500.
Drop the second if($start == 0) clause which sets $start to 1.
'Luck
-Szii
- Original Message -
From: "Jimmy Brake" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 15, 2
This is not really related to PHPDB
Send me the code . It looks like you have an unbalanced double-quote.
Same thing's happening with your footer, too.
Should be an easy fix.
-Szii
- Original Message -
From: "Brian Tegtmeier" <[EMAIL PROTECTED]>
To: <
search results after they're already
done searching and each one wasting cycles loading/reloading it. =)
Global includes work well for this -
if (!isset($isSearchResult))
{
unset($session_resultArray);
}
Anyone got any improvements on this?
Peace, love, code.
-Szii
- Origina
Perhaps...?
$x = 0;
while ($x < 7)
{
if (!isset($myArray[$x]))
{
$myArray[$x] =0;
}
}
-Szii
- Original Message -
From: "Tyrone Mills" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 24, 2001 3:58 PM
Subject: [PHP-DB] Can't g
Read The Fine Manual?
exec();
-Szii
- Original Message -
From: Paul S <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 4:13 PM
Subject: [PHP-DB] reword my question
> How do I execute a shell script in php?
>
> I just started to use php an
*begins dousing Paul S with water before the flames start*
-Szii
- Original Message -
From: Paul S <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 3:04 PM
Subject: [PHP-DB] PHP question needing info
> I have a question that I need help with.
&g
The newest MySQL code has transactions via their implementation of
Sleepcat's BDB tables.
If you use BDB tables instead of MyISAM you can do transactions.
Check the syntax on CREATE TABLE for details on how to create
BDB tables.
'Luck
-Szii
- Original Message -
From: Gar
Off the top of my head, and it's 3am local so take this with a grain of
salt, but I think that
this will work...
Update Table1, Table2 SET Table1.column1 = 'blah', Table2.column1='foo'
WHERE
Table1.ID = x AND Table2.ID = y
'Luck
-Szii
- Original Message -
Is there a known way to "reset" this field? If I make a call and it
succeeds,
then it should be set. If it fails, shouldn't it at least be reset to 0
or -1 instead
of simply the last successful insert? Is this the expected behavior?
-Szii
--
PHP Database Mailing List (htt
http://www.php.net/manual/en/function.eval.php
Couple of notes from the userbase show how to include HTML in
a php $content passed to eval()
'Luck.
-Szii
At 05:07 PM 2/8/2001 +1300, Simon Helson wrote:
>Hey guys - I've been mulling this one over for a few days now - and still
can add a line into /etc/ld.so.conf too.
-Szii
At 11:08 PM 2/4/2001 -0500, Chris Book wrote:
>Hello,
>
>I've installed db2 and created the default instance at /home/db2inst1/.
>PHP is compiled with the --with-ibm-db2 option, however when I try to start
>apache I get the m
m-db2=. Make sure you run the CATALOG
commands on the client so that it can find the AS400 database.
'Luck!
-Szii
At 10:41 AM 2/4/2001 -0800, Pete Lancashire wrote:
>I'm going to be trying to connect to the native DB2 database in a AS/400
>So far thats all I know about the IBM side
e
bindcols() method is working.
After more playing, I still cannot seem to actually USE the results
of an odbc_columns() call on DB2 since just about everything
"fetch-related" segfaults. Is there another method or set of methods
that I'm missing?
Thoughts? Ideas?
-Szii
--
Yeah, I'm using the Unified ODBC. The abstraction layer over DB2's CLI
is faster than "real" ODBC.
-Szii
At 08:57 AM 1/19/01 -0500, Andrew Hill wrote:
>Regarding the wrapper - I assume you are using the built-in unified-odbc...
>which isn't really ODBC.
>As I
whole lot of what looks to be random strings. I can see parameter
lists where there should be names or schemas for example.
Again, it looks like random memory. If SQLColumns() is failing though,
when the bindcols() method is called it'll bind random stuff, so it's not
terribly unexpecte
70 matches
Mail list logo