Justin Baiocchi wrote:
> Hi,
>
> I am trying to do the following:
> - retrieve data from a table based on the $id field (easy enough)
> - add a few more fields to the data set, then
> - enter the data (and new fields) into a new table (based on the
> selected $id field)
>
> I'm just not sure how
Hi,
Refer to
http://dev.mysql.com/doc/mysql/en/Too_many_connections.html
Concretely, the description below is added to the [mysqld] section
of my.cnf (my.ini for Windows), and mysqld is rebooted.
[mysqld]
set-variable=max_connections=500
--
Sumito_Oda mailto:[EMAIL PROTECTED]
--
PHP Databas
Yes, your right, but I also think his MySQL SQL statement needs to be
checked.
Maybe can also try to add this right after the mysql_query function call.
echo mysql_errno() . ": " . mysql_error() . "\n";
- Original Message -
From: "Cole S. Ashcraft" <[EMAIL PROTECTED]>
Date: Wednesday,
I need the exact error message. Copy Paste it from the browser. I also
need line numbers.
Cole
water_foul wrote:
i fixed those things and it didn't fix it :( :( :( :( :( :( :( :( :( is
there a icq chatroom for php?)
"Shahmat Bin Dahlan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
The error he is getting means that his MySQL resource (in this case the
results of the query) does not exist. Try
$pic1=mysql_fetch_array($pic);
Also, can you give the exact text of the error (line number and all) and line numbers for the entire passage?
Cole
Shahmat Bin Dahlan wrote:
Your SQL st
i fixed those things and it didn't fix it :( :( :( :( :( :( :( :( :( is
there a icq chatroom for php?)
"Shahmat Bin Dahlan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Your SQL statement:
>
> 'SELECT Rune, username FROM RuneRunner
> RuneRunner_1 WHERE (User_ID = 3)
Your SQL statement:
'SELECT Rune, username FROM RuneRunner
RuneRunner_1 WHERE (User_ID = 3)'
What is "RuneRunner" and "RuneRunner_1"? Are these two different tables.
If it is, you might want to separate them with a comma.
Why not try getting rid of the brackets surrounding "User_
I checked em all they were right
"Daniel Clark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Sounds like it doesn't like your SQL statement. Perhaps a field or table
> name is incorrect?
>
> > Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> > result
> > reso
Sounds like it doesn't like your SQL statement. Perhaps a field or table
name is incorrect?
> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL
> result
> resource in ...
> "Daniel Clark" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> What error are you ge
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in ...
"Daniel Clark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What error are you getting?
>
> > why doesn't this work:
> > $pic=mysql_query('SELECT Rune, username FROM RuneRunn
I tried that it didn't work
"Cole S. Ashcraft" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Just from looking at it, it seems to be because you are redefining a
> variable, which destroys it, then calling for a mysql resource that has
> been destroyed. What is the error?
>
> I can'
What error are you getting?
> why doesn't this work:
> $pic=mysql_query('SELECT Rune, username FROM RuneRunner
> RuneRunner_1 WHERE (User_ID = 3)',$connection);
> $pic=mysql_fetch_array($pic);
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.ph
Just from looking at it, it seems to be because you are redefining a
variable, which destroys it, then calling for a mysql resource that has
been destroyed. What is the error?
I can't gaurantee that that is what is happening.
Cole
> why doesn't this work:
> $pic=mysql_query('SELECT Rune, use
why doesn't this work:
$pic=mysql_query('SELECT Rune, username FROM RuneRunner
RuneRunner_1 WHERE (User_ID = 3)',$connection);
$pic=mysql_fetch_array($pic);
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
A simple way to debug your scripts would be like this :
FROM :
$result_timesheet=mysql_query("INSERT INTO tblTimesheet (TimesheetID,
WorkerID, ClientID, TimesheetDate, ProspectiveOrRetrospective) VALUES
('$TimeSheetID','$WorkerID','$ClientID','$TimesheetDate','$ProspectiveOrRetr
ospective')")or di
Thanks Gary and those who replied,
What I have ended up doing is using 3 tables: the original, a temporary
one and the target table. It's clunky and probably not the way to do it,
but this is my first php application and is just a learning exercise.
-Original Message-
From: Gary Every [
How do I enable more connections for mysql. the default is 100 but i want to
set more. does anyone know?
--
**
Free Nokia Ringtones US
http://www.ring-tones.us
**
--
PHP Database Mailing List (http://www.php.net/)
To unsubsc
Let's say you want to build a table with a couple extra fields, say the
name associated with the id, and today's date
Try:
CREATE TABLE new_table SELECT t1.id, t2.id_name, NOW() FROM table1 t1,
table2 t2 WHERE t1.id=t2.id
This will build a table with all the id's from table1 that have an
associa
Good point. Since it's form data, what about $_POST['TimesheetID'] ?
> Don't see anything obviously wrong with your query string. Are the inserts
> happening in the same block of code, i.e., are you sure that
> _$TimesheetID_ has a value in it when you're performing the second insert?
>
>
> -dave
Any errors? Is the all the other data inserting into the second table?
> Hello,
> I am using a form to Insert data into 2 tables in the same database.
>
> $TimesheetID needs to be in each table. However, it is not being inserted
> into the second table, "tblTimesheetDetails" . Any advise?
>
> $r
Don't see anything obviously wrong with your query string. Are the inserts
happening in the same block of code, i.e., are you sure that
_$TimesheetID_ has a value in it when you're performing the second insert?
-dave
> I am using a form to Insert data into 2 tables in the same database.
> $
In that case you can do something like this:
$s_where = '';
foreach (array('name', 'lastname', 'nickname') as $e)
{
$s_where .= (!empty($s_where) ? ' AND ' : '' ) . (!empty($_REQUEST[$e]) ?
"$e='$_REQUEST[$e]'" : '' );
}
$result = mysql_query("SELECT id, name , lastname , m_date from users " .
Hello,
I am using a form to Insert data into 2 tables in the same database.
$TimesheetID needs to be in each table. However, it is not being inserted
into the second table, "tblTimesheetDetails" . Any advise?
$result_timesheet=mysql_query("INSERT INTO tblTimesheet (TimesheetID,
WorkerID, ClientID
Look at the INSERT... SELECT syntax in the MySQL manual
Basically you can do this but only between 2 different tables (which is
what you specified) :
Generate and *test* the SELECT statement you want to use to recover your
data set.
Then in PHP try a query like this :
$query="INSERT INTO table2
24 matches
Mail list logo