On Sep 30, 2005, at 11:51 AM, Larry E. Ullman wrote:
I had this problem a while ago, when you try to create the second
connection
to the database with the same login credentials, i.e username and
password.
If mysql / php detect there is a connection already established
with those
details
Hi all,
I am working on an application that requires me to connect to two
MySQL databases both hosted on the same server.
I have an existing set of class files I created to handle the db
connection to the main database. To connect to the second database, I
duplicated my db class files
Hi all,
I have a table that contains the 'Sort Order' of some stories which are
kept in another table. I want to be able to 're-order' these items but
I am not sure how to go about this (technique wise).
For example: I have a form with a series of select menus. Each menu
represents the
I am trying to build an array from the results of a query on a mySQL
table.
I am using a loop to create this string in a variable $mystring:
'30'=true, '20'=true
I then need to use it like this:
$defaultValues['ib_article'] = array($mystring);
It isn't working. I am sure there is a better
, at 04:32 PM, Jennifer Goodie wrote:
Instead of building a string in your loop do the assignment in the loop
I have no idea what is being pulled from where, so I can't really give
a
good example
-Original Message-
From: Charles Kline [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 1:25
= $thevalue){
$defaultValues['ib_article'][$thevalue] = 'true';
}
I'm not sure if the indices line up exactly with what you had in mind,
but
I'm confident you can play with it to get what you want.
-Original Message-
From: Charles Kline [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31
hi all, i am changing the title are reposting - i have a clearer idea
now of what i am trying to do...
what is the syntax to initialize an associative array with values
returned in a query where the key in the array is coming from the query
and the value is static value of true?
i want to
Hey. I just figured it out! So simple too :)
$myarray = array();
foreach ($sth_opt as $thekey = $thevalue){
$myarray[$thevalue] = true;
}
On Monday, March 31, 2003, at 06:05 PM, Charles Kline wrote:
hi all, i am changing the title are reposting - i have a clearer idea
now of what i am
How would I modify the code below to handle an UPDATE?
On Sunday, March 30, 2003, at 07:19 PM, Charles Kline wrote:
then I built the INSERT like so:
foreach($article_keys as $articleid)
{
$insert[] = ('$v_ib_id','$articleid');
}
$article_sql = INSERT INTO tbl_ib_articles (issue_brief,article
Everything looks okay with this when I echo the sql string:
INSERT INTO tbl_ib_articles (issue_brief,article) VALUES
('24','30'),('24','20'),('24','31')
My question was, what do I need to change to make this an UPDATE?
Thanks,
Charles
On Monday, March 31, 2003, at 08:30 PM, [EMAIL PROTECTED]
hi all,
i was just wondering if there are any naming conventions when creating
database connections. most of my books use
$sql = SQL STRING;
and
$sth = $db-query() or $result = $db-query()
I have no idea what sth stands for in this case, but was curious how
others name stuff.
thanks
Hi there.
I was wondering what is the best way to insert multiple records into a
table? Here is the scenario...
I have a form which has 5 select menus as part of the data that gets
entered. Most of the data goes into a table called tbl_reports. Each of
these 5 menus contains the same list of
Since I don't totally understand (newbie) I will show you an example of
the form.
form
select name=person1
option value=1Joe Smith/option
etc.
/select
input type=radio name=person1yn value=Yes Y input type=radio
name=person1yn value=No N
select name=person2
option value=1Joe Smith/option
etc.
John,
Thanks. Yes that is a big help. The radio button is actually not used
for that purpose (sorry that was a bit confusing of me to put in
without an explanation). For each person selected, the radio button Y/N
relates to whether they are an author of the report or just a
contributer. I
John,
I modified my form, but not having much luck.
Here is my new form (so far):
** I need to add 4 more selects, not sure how to name them **
select name=investigator[person]
option value=0Choose person/option
option value=1064618047Paul A/option
option value=1655387822Katrina A/option
option
.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
-Original Message-
From: Charles Kline [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 9:11 PM
To: Peter Lovatt
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] INSERT
16 matches
Mail list logo