[PHP-DB] MySQL/PHP ideas

2001-07-04 Thread Jesse S. Williams
Use PHP and MySQL to pop up dynamic (DHTML) : Here's a thought on using a MySQL database with several tables to help create tutorials and such with pop-up windows written in DHTML. A simple version of this would be as follows: You have a paragraph. In that paragraph are four words that you wan

RE: [PHP-DB] Handling Linefeeds in MySQL/PHP

2001-07-04 Thread Steve Brett
you could also use nl2br() nl2br (PHP 3, PHP 4 ) nl2br -- Inserts HTML line breaks before all newlines in a string Description string nl2br (string string) Returns string with '' inserted before all newlines -- no point reinventing the wheel Steve > -Original Message- > From:

[PHP-DB] mysql_query returns nothing?

2001-07-04 Thread Stefan Siefert
Hm, since we are using PHP 4.0.6 we do get sometimes no returnvalue...(function mysql_query) I think, this is always then, when we are executing update oder delete syntax hm, does anyone know anything about it? Stefan Siefert -- PHP Database Mailing List (http://www.php.net/) To unsubscrib

[PHP-DB] Authomatic Sorting

2001-07-04 Thread Wilmar Pérez
Hello guys I have the following two problems: I've got a table with an autoincrement field which is the registry's ID, everything goes well until I delete any registry. MySQL doesn't re-sorts the information. That is, I have the following: 001 user1 002 user2 003 user3 If I delete user2,

[PHP-DB] sorting a field

2001-07-04 Thread Wilmar Pérez
Hello guys I've got a quite silly question: is there any way to sort up a field with missing values in it? --- Wilmar Pérez IT Manager - Central Library University of Antioquia Medellín - Colombia tel:

Re: [PHP-DB] Authomatic Sorting

2001-07-04 Thread Paul Burney
on 7/4/01 1:50 PM, Wilmar Pérez at [EMAIL PROTECTED] wrote: > I've got a table with an autoincrement field which is the registry's ID, > everything goes well until I delete any registry. MySQL doesn't re-sorts > the information. That is, I have the following: Just add an "ORDER BY" clause to

Re: [PHP-DB] Authomatic Sorting

2001-07-04 Thread Ken Sommers
D you ever create an index on the primary key to speed things up?? ken - Original Message - From: "Paul Burney" <[EMAIL PROTECTED]> To: "Wilmar Pérez" <[EMAIL PROTECTED]>; "PHP List" <[EMAIL PROTECTED]> Sent: Wednesday, July 04, 2001 3:18 PM Subject: Re: [PHP-DB] Authomatic Sorting on 7/

RE: [PHP-DB] Authomatic Sorting

2001-07-04 Thread Mats Remman
The 'problem' here is the logic of sql databases. you have one id and one 'username' and they belong to eachother. id 1 -> user 1 id n -> user n meaning if you delete user 23, only id 23 is affected. If you want the userid 'resorted' you will have to issue a few commands (which also would destro

Re: [PHP-DB] Authomatic Sorting

2001-07-04 Thread Dobromir Velev
When you delete a record it doesn't affect the other ones, so if you want to change the other ones you have to update them too. For this purpose I use the following SQL command after deleting a row: UPDATE table SET id_field=id_field-1 where id_field>deleted_ID_value I hope this will help Dobr

Re: [PHP-DB] sorting a field

2001-07-04 Thread Dobromir Velev
Hi, There is no difference if there are empty fields or not. The empty or missing fields will be sorted at the top (unless you specify a descenting sort order) If you want to skip the missing fields use a where filed_name is not Null clause Hope this will help Dobromir Velev -Original Mes