php-general Digest 17 Mar 2007 13:28:19 -0000 Issue 4682

Topics (messages 250737 through 250748):

Re: Limited text fields on phpMyAdmin?
        250737 by: Skip Evans
        250738 by: Skip Evans

Getting last record ID created from DB
        250739 by: Jeff
        250740 by: Rod Person
        250741 by: Janet Valade
        250742 by: Philip Thompson
        250743 by: Jim Lucas
        250748 by: Mark

php +html mail
        250744 by: Wasantha De Silva
        250745 by: Tijnema !
        250747 by: Martin Marques

Mail function undefined in PHP6
        250746 by: Tijnema !

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Jake McHenry wrote:
I still have a copy of phpMyAdmin 2.2.0, works great, but if the text field value is over 65k, it will truncate the data.

define a paragraph or two.


Anywhere from 10 to 50 English words. Far, far less than 65K.

Skip



--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240

=-=-=-=-=-=-=-=-=-=-=

Check out PHPenguin, a lightweight and versatile PHP/MySQL development framework.

http://phpenguin.bigskypenguin.com

--- End Message ---
--- Begin Message ---
Hey Jake,

Yeah, everything else works fine. And in fact I even found that if I delete one of the text fields, for a total of eight, it starts working again.

I tried deleting different ones, but it seems to be stuck on only allowing 8 text fields, regardless of the content.

I've never seen phpMyAdmin do anything like this.

Skip

Jake McHenry wrote:
Hey all,

I have a client that uses phpMyAdmin quite a bit as sort of an end user type app, but that's another story altogether (they actually get a lot of use out of it when they're PHP app won't give them the data the way they want.)

But anyway, they've created a table with 9 fields type 'TEXT' and put about a paragraph or two into each field, but seemed to have run up against a limit there.

I'm pretty surprised that phpMyAdmin would have that kind of a limit there, and have checked out the data for any funkiness that might prevent it from displaying, but when they select that table to edit a record it displays only the top like describing the table and then stops.


I did miss this on my first glance, can you edit other records?



Has anyone experienced anything like this with phpMyAdmin? They are running 2.5.7. I know they should upgrade and I keep telling them that, but they are one these "if it ain't broke don't fix it " outfits and have been using the same install for a couple of years, and are pretty set in their ways.

Thanks!
Skip
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240
http://bigskypenguin.com
=-=-=-=-=-=-=-=-=-=
Check out PHPenguin, a lightweight and
versatile PHP/MySQL development framework.
http://phpenguin.bigskypenguin.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240

=-=-=-=-=-=-=-=-=-=-=

Check out PHPenguin, a lightweight and versatile PHP/MySQL development framework.

http://phpenguin.bigskypenguin.com

--- End Message ---
--- Begin Message ---
Is there a way to get the last Record # created by the DB.

Example:

User_ID = auto_increment
f_name = varchar
l_name = varchar
e-mail = varchar
b_date = varchar
pic = varchar


Since user_id is an auto_inc field I submit it as a NULL, also I haven't 
started the code for a picture yet either so I have it set to NULL at this 
moment.
My code is:

$query = "INSERT INTO `t_users` (`user_id`, `f_name`, `l_name`, `e_mail`, 
`b_date`, `pic`) VALUES ('', '$f_name', '$l_name', '$e_mail', '$b_date', 
'')";
$result = mysql_query($query);
if(!$result)
{
die("Could not query the database: <br/>".mysql_error());
}
echo "Your Player information has been stored OK.<br />";

what code could I add here to make the following line work?

echo "REMEMBER your USER ID# you will need it when creating Characters!! It 
is: $user_id"; <----- I want to show the "user_id" just created here.

Thanks in advance! 

--- End Message ---
--- Begin Message ---
On Fri, 16 Mar 2007 22:28:54 -0500
"Jeff" <[EMAIL PROTECTED]> wrote:

> Is there a way to get the last Record # created by the DB.
> 

> 
> $query = "INSERT INTO `t_users` (`user_id`, `f_name`, `l_name`,
> `e_mail`, `b_date`, `pic`) VALUES ('', '$f_name', '$l_name',
> '$e_mail', '$b_date', '')";
> $result = mysql_query($query);
> if(!$result)
> {
> die("Could not query the database: <br/>".mysql_error());
> }
> echo "Your Player information has been stored OK.<br />";
> 
> what code could I add here to make the following line work?
> 
> echo "REMEMBER your USER ID# you will need it when creating
> Characters!! It is: $user_id"; <----- I want to show the "user_id"
> just created here.
> 
> Thanks in advance! 
> 

select user_id from t_users where user_id = (select max(user_id) from
t_users)

-- 

Rod

-----

Empty your mind, be formless, shapeless like water.
Now you put water into a cup and it becomes the cup.
You put water in a bottle it becomes the bottle.
You put it into a teapot it becomes the teapot.
Now water can flow or it can crash.
Be water, my friend.
 -- Bruce Lee

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Jeff wrote:

Is there a way to get the last Record # created by the DB.
...

what code could I add here to make the following line work?

echo "REMEMBER your USER ID# you will need it when creating Characters!! It is: $user_id"; <----- I want to show the "user_id" just created here.

Thanks in advance!

The function mysql_insert_id will return the previous id inserted.

http://us3.php.net/manual/en/function.mysql-insert-id.php

Janet



--
Janet Valade -- janet.valade.com

--- End Message ---
--- Begin Message ---
On Mar 16, 2007, at 10:28 PM, Jeff wrote:

Is there a way to get the last Record # created by the DB.

Example:

User_ID = auto_increment
f_name = varchar
l_name = varchar
e-mail = varchar
b_date = varchar
pic = varchar


Since user_id is an auto_inc field I submit it as a NULL, also I haven't started the code for a picture yet either so I have it set to NULL at this
moment.
My code is:

$query = "INSERT INTO `t_users` (`user_id`, `f_name`, `l_name`, `e_mail`, `b_date`, `pic`) VALUES ('', '$f_name', '$l_name', '$e_mail', '$b_date',
'')";
$result = mysql_query($query);
if(!$result)
{
die("Could not query the database: <br/>".mysql_error());
}
echo "Your Player information has been stored OK.<br />";

what code could I add here to make the following line work?

echo "REMEMBER your USER ID# you will need it when creating Characters!! It
is: $user_id"; <----- I want to show the "user_id" just created here.

Thanks in advance!


For auto increment values, you don't have to specify the id. For example:

INSERT INTO t_users (f_name, l_name, e_mail, b_date, pic)
VALUES ('$f_name', '$l_name', '$e_mail', '$b_date', null);

Then to find the latest entry:

SELECT user_id FROM t_users ORDER BY user_id DESC limit 1;

Hope that helps.

~Philip

--- End Message ---
--- Begin Message ---
Janet Valade wrote:
Jeff wrote:

Is there a way to get the last Record # created by the DB.
...

what code could I add here to make the following line work?

echo "REMEMBER your USER ID# you will need it when creating Characters!! It is: $user_id"; <----- I want to show the "user_id" just created here.

Thanks in advance!

The function mysql_insert_id will return the previous id inserted.

http://us3.php.net/manual/en/function.mysql-insert-id.php

Janet



but to use this, you need to have the user_id field name and value omitted from the insert statement.

Other wise it enters a null value in the field, basically overriding the purpose of the auto_increment setting.

Once you have completed the the insert,

run this command

http://www.php.net/mysql_insert_id


This will then give you the LAST INSERT ID for your connection to the DB.


Hope it helps

--- End Message ---
--- Begin Message ---
Rod Person wrote:

> On Fri, 16 Mar 2007 22:28:54 -0500
> "Jeff" <[EMAIL PROTECTED]> wrote:
> 
>> Is there a way to get the last Record # created by the DB.
>> 
> 
>> 
>> $query = "INSERT INTO `t_users` (`user_id`, `f_name`, `l_name`,
>> `e_mail`, `b_date`, `pic`) VALUES ('', '$f_name', '$l_name',
>> '$e_mail', '$b_date', '')";
>> $result = mysql_query($query);
>> if(!$result)
>> {
>> die("Could not query the database: <br/>".mysql_error());
>> }
>> echo "Your Player information has been stored OK.<br />";
>> 
>> what code could I add here to make the following line work?
>> 
>> echo "REMEMBER your USER ID# you will need it when creating
>> Characters!! It is: $user_id"; <----- I want to
>> show the "user_id" 
>> just created here.
>> 
>> Thanks in advance!
>> 
> 
> select user_id from t_users where user_id = (select max(user_id) from
> t_users)
> 

It should be noted that that is the absolute 100% WRONG way to do it. If
your site has any concurrency, you will almost certainly get the wrong
user.

--- End Message ---
--- Begin Message ---
Dear all,

I want get a help from you for some php codes.

How can I get it.

Regards
wasantha

--- End Message ---
--- Begin Message ---
On 3/17/07, Wasantha De Silva <[EMAIL PROTECTED]> wrote:
Dear all,

I want get a help from you for some php codes.

How can I get it.

Regards
wasantha

Maybe you can make yourself a little bit more clear?

What code do you have atm, what do you want us to help with?

Tijnema

--- End Message ---
--- Begin Message ---
On Sat, 17 Mar 2007, Wasantha De Silva wrote:

Dear all,

I want get a help from you for some php codes.

Use google. There is plenty of code out there.


--
 21:50:04 up 2 days,  9:07,  0 users,  load average: 0.92, 0.37, 0.18
---------------------------------------------------------
Lic. Martín Marqués         |   SELECT 'mmarques' ||
Centro de Telemática        |       '@' || 'unl.edu.ar';
Universidad Nacional        |   DBA, Programador,
    del Litoral             |   Administrador
---------------------------------------------------------

--- End Message ---
--- Begin Message ---
Hi,

I have PHP6 installed (Snapshot:200703141130) and somehow it says now
that the mail function is undefined, i have sendmail installed in /usr
(is in $PATH)
my configure command:

'./configure' '--prefix=/usr' '--with-pear' '--enable-all'
'--with-apxs2' '--without-fbsql' '--without-interbase'
'--without-mssql' '--with-mysql=/usr/mysql' '--with-msql=/usr/msql3'
'--with-mysqli=/usr/mysql/bin/mysql_config' '--without-oci8'
'--without-pdo-firebird' '--with-pdo-mysql=/usr/mysql'
'--without-pdo-oci' '--without-pdo-odbc' '--with-pdo-pgsql=/usr/psql'
'--with-pgsql=/usr/psql' '--without-sybase-ct' '--with-sybase'
'--without-recode' '--without-informix' '--disable-mbregex'
'--without-pdo-dblib'

So, i don't see any reason why the mail function isn't build in...

Kind Regards,

Tijnema

--- End Message ---

Reply via email to