[PHP-DB] Hi, simple question

2003-07-01 Thread Patrik Fomin
Hi, im adding a post to the database, is there any way to retrive back the ID for the post that i just created? the id is auto_increment and primary key. like $sql = insert into test (namn, www) values('test', 'test.com'); mysql_query($sql); $row = mysql_get_post(id); ? the only way i could

Re: [PHP-DB] Hi, simple question

2003-07-01 Thread Oscar Rylin
see mysql_insert_id($link_identifier) -- rylin Patrik Fomin wrote: Hi, im adding a post to the database, is there any way to retrive back the ID for the post that i just created? the id is auto_increment and primary key. like $sql = insert into test (namn, www) values('test', 'test.com');

RE: [PHP-DB] Hi, simple question

2003-07-01 Thread Nick Pappas
PROTECTED] Sent: Tuesday, July 01, 2003 9:04 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Hi, simple question Hi, im adding a post to the database, is there any way to retrive back the ID for the post that i just created? the id is auto_increment and primary key. like $sql = insert into test

RE: [PHP-DB] A Simple Question

2002-07-10 Thread Adam Royle
Just a correction you can use arrays with querystrings page.php?var1[]=firstvar1[]=secondvar1[]=third $var1 Array ( [0] = first [1] = second [2] = third ) OR page.php?var1[]=firstvar2[2]=secondvar2[]=third $var 1 Array ( [0] = first ) $var2 Array ( [2] = second

RE: [PHP-DB] A Simple Question

2002-07-10 Thread Beau Lebens
/a'; then on link.php you'd have the array $array[] (with globals) or $_GET['array'][] cool Beau -Original Message- From: Adam Royle [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 10 July 2002 9:05 PM To: Beau Lebens; [EMAIL PROTECTED] Subject: RE: [PHP-DB] A Simple Question Just

[PHP-DB] A Simple Question

2002-07-09 Thread Manuel
I recently discovered that you can pass variables through hyperlinks. (I didn't know this could be done) This will be very helpful for the project I'm working on but I cannot find any information on this subject. Does anybody know where I can find information on the syntax and limitations of

Re: [PHP-DB] A Simple Question

2002-07-09 Thread Tony
Suppose you are using PHP. A link like this: http://yourdomain.com/yourpage.php?var1=value1var2=value2var3=value3 will do the trick. And in the page that receives this link (yourpage.php that is), use $_GET[] to get the value: $var1 = $_GET[var1]; $var2 = $_GET[var2]; $var3 = $_GET[var3];

RE: [PHP-DB] A Simple Question

2002-07-09 Thread Beau Lebens
Message- // From: Tony [mailto:[EMAIL PROTECTED]] // Sent: Wednesday, 10 July 2002 7:42 AM // To: Manuel; [EMAIL PROTECTED] // Subject: Re: [PHP-DB] A Simple Question // // // Suppose you are using PHP. // A link like this: // // http://yourdomain.com/yourpage.php?var1=value1var2=value2va // r3

Re: [PHP-DB] A Simple Question

2002-07-09 Thread Adam Alkins
4. Be careful with the $_GET[] array that Tony mentions, it is only available on more recent versions of PHP, before that it was $HTTP_GET_VARS and a lot of people had been using just plain $var1 or whatever, assuming that register_globals would always be ON in the php.ini file (which also

[PHP-DB] a simple question

2001-07-09 Thread Brad Lipovsky
can somebody help me with the following code: function multi_word($title) { $array = explode ( , $input); $number = count ($array); if ($number 1) { return true; } else{ return false; } } if ($category) { $Query = SELECT * from $TableName WHERE ((category)=$category); }

Re: [PHP-DB] a simple question

2001-07-09 Thread Frank M. Kromann
Hi Brad, Your parameter is named $title and you are converting a variable called $input to an array. You could catch this type of errors if you change the setting for error_reportiong in php.ini. - Frank can somebody help me with the following code: function multi_word($title) {