Yeah I used the mysql_error and it returned Can't create table
'.\website\table2.frm' (errno: 150). So what does that say?
Date: Tue, 7 Apr 2009 17:38:59 +0400
From: evge...@kosov.su
To: defati...@hotmail.com
CC: mysql@lists.mysql.com
Subject: Re: PHP-MYSQL Question
Perhaps you
:59 +0400
From: evge...@kosov.su
To: defati...@hotmail.com
CC: mysql@lists.mysql.com
Subject: Re: PHP-MYSQL Question
Perhaps you don't have permissions to create tables?
It would have been much clearer if your script was like this:
$result=mysql_query($your_create_table_statement);
if($result
that be the problem?
Date: Tue, 7 Apr 2009 17:48:16 +0400
From: evge...@kosov.su
To: defati...@hotmail.com
CC: mysql@lists.mysql.com
Subject: Re: PHP-MYSQL Question
# perror 150
MySQL error code 150: Foreign key constraint is incorrectly formed
What does table1 look like?
abdulazeez
Perhaps you don't have permissions to create tables?
It would have been much clearer if your script was like this:
$result=mysql_query($your_create_table_statement);
if($result){ printSuccessful;}
else {print Unsuccessful: .mysql_error()}
abdulazeez alugo wrote:
Hi guys,
Please can anyone
@lists.mysql.com
Subject: Re: PHP-MYSQL Question
# perror 150
MySQL error code 150: Foreign key constraint is incorrectly formed
What does table1 look like?
abdulazeez alugo wrote:
Yeah I used the mysql_error and it returned Can't create table
'.\website\table2.frm' (errno: 150
Hi guys,
Please can anyone tell me what I'm doing wrong with the code below? It keep
returning unsuccessful.
$result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY
AUTO_INCREMENT,
table1_id INT NOT NULL,
name VARCHAR(100) NOT NULL,
school VARCHAR(100) NOT NULL,
comment
Subject: Re: PHP-MYSQL Question
I suppose the problem is that table1.table1_id and table2.table1_id are
of different types. The first one is INT UNSIGNED and the second is just
INT.
abdulazeez alugo wrote:
Table1 is as below:
CREATE TABLE table1(table1_id INT UNSIGNED NOT NULL
but table2
remains unsuccessful.
Date: Tue, 7 Apr 2009 17:56:49 +0400
From: evge...@kosov.su
To: defati...@hotmail.com
CC: mysql@lists.mysql.com
Subject: Re: PHP-MYSQL Question
I suppose the problem is that table1.table1_id and table2.table1_id are
of different types. The first one is INT
I've done that but it still gives the same error message.
Date: Tue, 7 Apr 2009 16:25:15 +0200
Subject: Re: PHP-MYSQL Question
From: spa...@googlemail.com
To: defati...@hotmail.com
CC: mysql@lists.mysql.com
it is not the ENGINE as Eugene mentioned above, is that you need to use
UNSIGNED
and it returned successful. So that was
the problem all along.
Thanks for your suggestions.
Best regards
Alugo Abdulazeez.
From: defati...@hotmail.com
To: spa...@googlemail.com
CC: mysql@lists.mysql.com
Subject: RE: PHP-MYSQL Question
Date: Tue, 7 Apr 2009 15:32:25 +0100
I've done
I just started working with mysql and I'm very novice
Created a simple database and programmed php to connect as follows...
?php
include (webvars.inc);
// webvars file is this
//?php$user = ???;$hostname = ???;$password = pass;
//$db=cs?
$link= mysql_connect($hostname,$user,$password)or die
Not sure if this can be done with just a MYSQL Query or if it needs to be
done in conjunction with a PHP script. What I am trying to do is build a
dynamic FAQ section with PHP. Here are the two tables
Topics
===
TopicID
TopicTitle
TopicDESC
FAQS
===
FAQID
Question
Answer
Topic
Luie,
Wouldn't replace change all the entries in your table row, same effect as update?
I believe the question is how to test which entry in a form has a new value and
replace/update only that value
in the table.
If I have a form...
__
|Employee Record
Wouldn't replace change all the entries in your table row, same effect as update?
I believe the question is how to test which entry in a form has a new value and
replace/update only that value in the table.
If I have a form...
__
|Employee Record Update|
|
-Original Message-
From: Peter Ruan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 4:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL question...not sure if this is the correct forum to
ask.
Hi,
Can the UPDATE statement have conditional check embedded in it? I
have
-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Friday, 15 February 2002 11:10 a.m.
To: [EMAIL PROTECTED]
Cc: '[EMAIL PROTECTED]'
Subject: FW: [PHP] MySQL question...not sure if this is the correct
forum to ask.
-Original Message-
From: Peter Ruan [mailto:[EMAIL PROTECTED
Dave Lake wrote:
Hi Folks
I have used MySQL for some time and am just getting my head around PHP. I
looked across a number of PHP sites for some input on this but failing to
find an answer thought I would ask some MySQL users (surely many of you are
using PHP right? ;-) ) for help.
I
Here is my db hierarchy:
Database: xtopsites
Table: Categories
idName
1Name1
2Name2
3Name3
4Name4
5Name5
6Name6
I would like the user to get to a sign up form and have all the names of the
categories displayed.is this possible to do using fetch_array? If it
Have a look at the PHP mysql_fetch_array and mysql_fetch_row functions and
associated documentation...
?php
//assuming the db is already connected
$query = select id,name from Categories;
$res = mysql_query($query,$dbh) or die (bad query);
while($row = mysql_fetch_array($res)) {
echo
you can use fetch_array:
$data = mysql_query(select * from Categories);
$aux=select name=categorie;
while ($row = mysql_fetch_array($data)) {
$aux.=option value=,$row['id']..$row['Name']./option;
}
$aux.=/select;
echo $aux;
this code will print in html a combobox with the options, in php,
Hello Adrian,
Friday, June 08, 2001, 8:59:51 AM, you wrote:
ADC Hi,
ADC I am not sure whether this relates to this list or the (not working) php
ADC list.
ADC For simplicity: I have a form that displays data from a table. I will
ADC take just one field that displays a name
ADC input
- Original Message -
From: Adrian D'Costa [EMAIL PROTECTED]
To: Mysql Mailing List [EMAIL PROTECTED]
Sent: Friday, June 08, 2001 13:59
Subject: php/mysql question
Hi,
I am not sure whether this relates to this list or the (not working) php
list.
For simplicity: I have a form
Hi,
I am not sure whether this relates to this list or the (not working) php
list.
For simplicity: I have a form that displays data from a table. I will
take just one field that displays a name
input type=text name=name value=? echo $row[name];?
This allow a user to update the changes when
Did you try the following code
$updtStmt = update vusers set orgname=\$tname1\ where id=$tid;
Should do the job.
Regards
P. Miquet
- Original Message -
From: Adrian D'Costa [EMAIL PROTECTED]
To: Mysql Mailing List [EMAIL PROTECTED]
Sent: Friday, June 08, 2001 7:59 AM
Subject: php/mysql
On Fri, 8 Jun 2001, Gabriele Bartolini wrote:
$tname =urldecode($name);
$tname1 = stripslashes($tname1);
$updtStmt = update vusers set orgname='$tname1' where id=$tid;
It all depends on these 2 variables settings:
magic_quotes_gpc= On
magic_quotes_runtime= Off
I
On Fri, 8 Jun 2001, Rolf Hopkins wrote:
- Original Message -
From: Adrian D'Costa [EMAIL PROTECTED]
To: Mysql Mailing List [EMAIL PROTECTED]
Sent: Friday, June 08, 2001 13:59
Subject: php/mysql question
Hi,
I am not sure whether this relates to this list
- Original Message -
From: Adrian D'Costa [EMAIL PROTECTED]
To: Rolf Hopkins [EMAIL PROTECTED]
Cc: Mysql Mailing List [EMAIL PROTECTED]
Sent: Friday, June 08, 2001 17:47
Subject: Re: php/mysql question
On Fri, 8 Jun 2001, Rolf Hopkins wrote:
- Original Message -
From
On Fri, 8 Jun 2001, Rolf Hopkins wrote:
What you wrote here and what you wrote below are not the same
update vusers set name=Adrian D'Costa where id=3;
update vusers set name='Adrian D\'Costa' where id=3;
will both work. Look up the section on escaping special characters in the
mysql
database,sql,query
On Fri, 8 Jun 2001, Gabriele Bartolini wrote:
magic_quotes_gpc = On ; magic quotes for
incoming GET/POST/Cookie data
And, what about: magic_quotes_runtime ?
Off.
Adrian
29 matches
Mail list logo