Chris.
Thanks for your response. I read somewhere that the mysqli was better, so I
have been using it.
This exercise is an experiment, on my local machine only, so I ommitted any
escape functions. I am trying to create DB's with multiple tables, so it is
totally a learning exercise.
So hopef
Colin
Thank you for your reply. I had previously found the page you linked in
your original post, however at this stage of my development, my imagination
creates error messages and not inovative solutions.
I have found some other issues that are presenting road blocks, once I solve
them, I wi
I have no idea how you got here but there is no reason to do it that
way. This will work just fine and I do it every day in php.
However I don't use mysqli I still use ...
mysql_connect
mysql_select_db
mysql_real_escape_string
mysql_query
Don't forget to use the mysql_real_escape_string funct
Normally I would avoid getting into this sort of argument ( The 'OMG someone on
teh internets are
wrong!!' argument)
But in this case, the solution ( still the first result in a google search) is
far more efficient than
closing a connection so you can insert into another table.
You are correc
Michael
Thank you for your response. It gave me the idea how to solve this, and it
seemed to have worked!
For those following hoping to see a solution, what I did was open the
connection, insert into one table, closed the connection, closed the php
script, and the data was inserted into 2 of
It is not a question of multiple tables, it is a question of multiple
statements. Most PHP configurations prohibit the application of more
than one statement per call to execute. This is generally thought to
be a security issue as the vast majority of simple PHP-based SQL
injection attacks only w
Seriously
You should read your answers before you post, the SA link did not provide
the answer. Had you read the page you sent, you would notice it does not
apply to mulitple tables...
Gary
"Colin Streicher" wrote in message
news:201004112310.16594.co...@obviouslymalicious.com...
> Serious
Seriously...
I found the answer in the first result.
http://lmgtfy.com/?q=mysqli+multiple+insert+statements
Assuming mysqli, if you are using a different driver, then google that
Colin
On April 11, 2010 10:36:41 pm viraj wrote:
> is it mysqli query or 'multi_query'?
>
> http://php.net/manual/e
is it mysqli query or 'multi_query'?
http://php.net/manual/en/mysqli.multi-query.php
~viraj
On Sun, Apr 11, 2010 at 10:27 PM, Gary wrote:
> I am experimenting with multiple tables, it is only a test that is my local
> machine only. This is the current code, which does not work , I have tried
>
On 6/11/07, Baron Schwartz <[EMAIL PROTECTED]> wrote:
Hi,
Hamish Allan wrote:
> Hi,
>
> Is it possible to insert values into two tables simultaneously and
> have the value of one of the columns in the second table be the
> auto_increment value from inserting into the first?
No, because you can
Hi,
Hamish Allan wrote:
Hi,
Is it possible to insert values into two tables simultaneously and
have the value of one of the columns in the second table be the
auto_increment value from inserting into the first?
No, because you can only insert into one table at a time. But you can write a sto
Guy
No. Requires multiple inserts.
David
> -Original Message-
> From: Defryn, Guy [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 15, 2002 4:55 PM
> To: [EMAIL PROTECTED]
> Subject: insert into multiple tables??
>
>
>
>
> Is it possible to insert data into different tables with o
12 matches
Mail list logo