RE: PHP-MYSQL Question

2009-04-07 Thread abdulazeez alugo
index 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

RE: PHP-MYSQL Question

2009-04-07 Thread abdulazeez alugo
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 UNS

Re: PHP-MYSQL Question

2009-04-07 Thread Spiros Papadopoulos
ble2 > 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 tab

RE: PHP-MYSQL Question

2009-04-07 Thread abdulazeez alugo
l@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 UNSIGNED and the second is just > INT. > > > abdulazeez alugo wrote: > > Table1 is as below: >

PHP-MYSQL Question

2009-04-07 Thread abdulazeez alugo
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 T

Re: PHP-MYSQL Question

2009-04-07 Thread Eugene Kosov
mail.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 alugo wrote: > > > > Yeah I used the mysql_error

RE: PHP-MYSQL Question

2009-04-07 Thread abdulazeez alugo
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 &g

Re: PHP-MYSQL Question

2009-04-07 Thread Eugene Kosov
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 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_st

RE: PHP-MYSQL Question

2009-04-07 Thread abdulazeez alugo
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 > S

Re: PHP-MYSQL Question

2009-04-07 Thread Eugene Kosov
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){ print"Successful";} else {print "Unsuccessful: ".mysql_error()} abdulazeez alugo wrote: Hi guys, Please can anyo

Php > mysql question please help

2003-12-25 Thread cohenstudio
I just started working with mysql and I'm very novice Created a simple database and programmed php to connect as follows... $link= mysql_connect($hostname,$user,$password)or die ("_something is whong"); mysql_select_db($db,$link); $query ="SELECT * FROM projects"; $result = mysql_query($query); $

Re: PHP / MYSQL Question

2003-02-21 Thread Tore Bostrup
vious" value of Topic from the previous record, and only output the Topic part when it changes. HTH, Tore. - Original Message - From: "Mike Walth" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 21, 2003 5:34 AM Subject: PHP / MYSQL Question

PHP / MYSQL Question

2003-02-21 Thread Mike Walth
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

Re: [PHP] MySQL question...not sure if this is the correct forum to ask.

2002-02-16 Thread DL Neil
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 Reco

RE: [PHP] MySQL question...not sure if this is the correct forum to ask.

2002-02-15 Thread 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 Update| |

RE: [PHP] MySQL question...not sure if this is the correct forum to ask.

2002-02-14 Thread Daniel Rosher
ginal Message- > 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. > > > -Origi

FW: [PHP] MySQL question...not sure if this is the correct forum to ask.

2002-02-14 Thread Rick Emery
-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 a

Re: PHP/MySQL question - need help with fputs, mysql statements

2001-10-01 Thread Tony Wells
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.

Re: Another PHP/MySQL question

2001-06-10 Thread MikeBlezien
On Sun, 10 Jun 2001 19:13:01 -0700, "Vladimir Kravtsov" <[EMAIL PROTECTED]> wrote: >> >> >> >>>connectdb(); >>mysql_select_db(xtopsites); >>$validated=1; >>$sql = "select id, siteurl, sitename, from sitesats where validated = "$validated""; >//

Re: Another PHP/MySQL question

2001-06-10 Thread Whit Blauvelt
On Sun, Jun 10, 2001 at 07:13:01PM -0700, Vladimir Kravtsov wrote: > $sql = "select id, siteurl, sitename, from sitesats where validated = "$validated""; >// Line 8 Actually, using '$validated' might work better - one or the other. Whit -

Re: Another PHP/MySQL question

2001-06-10 Thread Whit Blauvelt
On Sun, Jun 10, 2001 at 07:13:01PM -0700, Vladimir Kravtsov wrote: > $sql = "select id, siteurl, sitename, from sitesats where validated = "$validated""; >// Line 8 > What's wrong here? Try \"$validated\" - you need to escape the quoted quotes. Whit ---

RE: Another PHP/MySQL question

2001-06-10 Thread Don Read
On 11-Jun-01 Vladimir Kravtsov wrote: > > > > connectdb(); > mysql_select_db(xtopsites); > $validated=1; > $sql = "select id, siteurl, sitename, from sitesats where validated = > "$validated""; // Line 8 ^ ^ - escape your quotes, \"$validated\"; change to sin

Re: Another PHP/MySQL question

2001-06-10 Thread Augusto Cesar Castoldi
You have a problem with "... " is reserved word, put \ before it... try this: $sql = "select id, siteurl, sitename, from sitesats where validated = \"$validated\""; regards, Augusto On Sun, 10 Jun 2001, Vladimir Kravtsov wrote: > > > > connectdb(); > mysql_select_db(xtopsites); > $valid

Another PHP/MySQL question

2001-06-10 Thread Vladimir Kravtsov
When I run this I get: Parse error: parse error in c:\inetpub\wwwroot/php/X-TopSites/admin/admin.php on line 8 I want it to select the id, siteurl, sitename (in a table called sitesats) of any site which is not validated (I made it so validated=1 and not validated=2) What's wrong here? T

Re: PHP + MySQL question

2001-06-10 Thread Augusto Cesar Castoldi
you can use fetch_array: $data = mysql_query("select * from Categories"); $aux=""; while ($row = mysql_fetch_array($data)) { $aux.="".$row['Name'].""; } $aux.=""; echo $aux; this code will print in html a combobox with the options, in php, the variable "$catagorie" will have the "id" number o

Re: PHP + MySQL question

2001-06-10 Thread j.urban
Have a look at the PHP mysql_fetch_array and mysql_fetch_row functions and associated documentation... "; } ?> On Sun, 10 Jun 2001, Vladimir Kravtsov wrote: > Here is my db hierarchy: > Database: xtopsites > Table: Categories > idName > 1Name1 > 2Name2 > 3Name3 > 4Name4 >

PHP + MySQL question

2001-06-10 Thread Vladimir Kravtsov
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 i

Re: php/mysql question

2001-06-09 Thread Olexandr Vynnychenko
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> ADC> T

Re: Re: php/mysql question (fwd)

2001-06-08 Thread Adrian D'Costa
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 --

Re: php/mysql question

2001-06-08 Thread Neil Zanella
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

Re: php/mysql question

2001-06-08 Thread Rolf Hopkins
- 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,

Re: php/mysql question

2001-06-08 Thread Adrian D'Costa
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 > >

Re: php/mysql question

2001-06-08 Thread Adrian D'Costa
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=

Re: php/mysql question

2001-06-08 Thread Pascal MiQUET
[EMAIL PROTECTED]> Sent: Friday, June 08, 2001 7:59 AM 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 that displays data from a table. I will > take just one field that

php/mysql question

2001-06-08 Thread Adrian D'Costa
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 This allow a user to update the changes when the submit button is pressed. On the next php file I

Re: php/mysql question

2001-06-08 Thread Rolf Hopkins
- 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 (n