Re: [PHP] Mysql question

2002-02-06 Thread Emiliano Marmonti
AIL PROTECTED]> To: Emiliano Marmonti <[EMAIL PROTECTED]> Date: Wednesday, February 06, 2002 12:45 PM Subject: Re: [PHP] Mysql question > >This is really a question for a MySQL mailing list, not a PHP list since >this question has nothing to do with PHP. You can email the M

Re: [PHP] mysql question

2002-03-19 Thread Hiroshi Ayukawa
Hello, The length of VARCHAR must be specified like; CREATE TABLE sailordata ( sailorid INT(8) NOT NULL DEFAULT 0, lastname VARCHAR(255) NOT NULL, firstname VARCHAR(255) NOT NULL, middlenames VARCHAR(255) NOT NULL, dob VARCHAR(255) NOT NULL, telephone VARCHAR(255) NOT NULL, fa

RE: [PHP] mysql question

2002-04-08 Thread Rick Emery
mysql is a relational database. therefore, the concept of a row number is irrelevant. that said, what do you REALLY want to do -Original Message- From: Julian [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 2:59 PM To: [EMAIL PROTECTED] Subject: [PHP] mysql question Hi!!! I

Re: [PHP] mysql question

2002-04-08 Thread Miguel Cruz
On Mon, 8 Apr 2002, Julian wrote: > I want to know if there is a function to know which is the number of the row > that I selected. Not in MySQL. You should add an auto_increment index field to your table, and then you can always use that to see where you are. miguel -- PHP General Mailing

RE: [PHP] mysql question

2002-04-08 Thread James E. Hicks III
Why don't you just increment a counter as you are retrieving them. mysql_select_db("some_DB") or die("DB not available"); $query = "select some_data from some_table"; $result = mysql_query($query); $rowcounter=0; while ($row=mysql_fetch_array($result)){ extract($row); $rowcounter++; echo

RE: [PHP] MySQL question

2002-04-21 Thread .ben
In brief, and in no way finished (no error trapping, commenting, etc)... \n"; echo " \n"; echo "CatNumber\n"; echo "Title\n"; echo " \n"; while ($myrow = mysql_fetch_row($result)) { echo "\n"; echo " $myr

Re: [PHP] mysql question?

2001-01-22 Thread Richard Lynch
> mysql use myisamchk and myisamchk --recover to check and repair the table. > However, does anybody know how myisamchk indicates that whether the table is > damaged or > whether the the repair is successful when running myisamchk or > myisamchk --recover command? I'm pretty sure you get informa

Re: [PHP] Mysql Question

2001-02-03 Thread Richard Lynch
>Can i know the date of the last table update in a Mysql database? You can add a field named 'modified' that is of type 'timestamp' and use: select max(modified) from blah; I don't know of any documented way to check the last modified time for a whole table. -- Visit the Zend Store at http://w

RE: [PHP] mySQL Question....

2001-04-17 Thread Opec Kemp \( Ozemail \)
> if i perform a SELECT query (say) like the following: > > SELECT email_addr FROM myTable WHERE x = 1 > > in this query i want to pull-out (or list) all email > addresses where x equals 1, however, suppose i don't want any > duplicate email addresses... would i use ORDER BY and COUNT(*) to get l

Re: [PHP] mySQL Question....

2001-04-17 Thread Jason Caldwell
Opps. I meant GROUP BY... and it looks like I don't need to include the COUNT(). SELECT email_addr, x GROUP BY email_addr HAVING x = 1; Is this the only way to display a listing without duplicates, or is there a more efficient (faster) way? I don't want to DELETE the duplicates, just don't want

Re: [PHP] mySQL Question....

2001-04-17 Thread Don Read
On 18-Apr-01 Jason Caldwell wrote: > Opps. I meant GROUP BY... and it looks like I don't need to include the > COUNT(). > > SELECT email_addr, x GROUP BY email_addr HAVING x = 1; > > Is this the only way to display a listing without duplicates, or is there a > more efficient (faster) way? I do

Re: [PHP] mySQL Question....

2001-04-18 Thread Toby Miller
How about actually using distinct? SELECT DISTINCT(email_addr) FROM myTable WHERE x = 1 --Toby - Original Message - From: "Jason Caldwell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 1:47 AM Subject: [PHP] mySQL Question > if i perform a SELECT que

[PHP] RE:[PHP] mysql question

2002-04-08 Thread Julian
Thanks James! It is the perfect answer for my cuestion!!! Regards! Julian - Original Message - From: James E. Hicks III To: Julian ; [EMAIL PROTECTED] Sent: Monday, April 08, 2002 5:12 PM Subject: RE: [PHP] mysql question Why don't you just increment a counter as yo

Re: [PHP] Mysql question(s)

2001-01-24 Thread Richard Lynch
> I created a table with FaceMysql that had one field and I could not add data > to it .Only when I recreated it with 2 fields and a primary key did it > work.Is there any reason for this?Must there always be a primary key in > Mysql?I've never known this to be true of relational Db's.Especially i

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

2002-02-14 Thread DL Neil
Peter, > I have a quick MySQL question...if this is not the correct forum for > it, then someone please point me to the right one. > > Can the UPDATE statement have conditional check embedded in it? I > have a page that displays a record (in a FORM format) that the user can > change the inf