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
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');
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
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
/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
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
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];
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
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
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);
}
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) {
11 matches
Mail list logo