Re: [PHP-DB] retrieving field names in ascending order

2005-09-08 Thread Pablo M. Rivas
FROM table,$db); if (mysql_num_rows($result) 0) { while ($row = mysql_fetch_assoc($result)) { $k[$row['Field']]=$row['Type']; } ksort($k); while (list($key,$value)=each($k)) echo $key $valuebr\n; } Pablo. -- Pablo M. Rivas. http://www.pmrivas.com http://www.r3soft.com.ar

Re: [PHP-DB] Pagination problems

2005-09-02 Thread Pablo M. Rivas
system without keeping a copy. Thank you. Alimentos La Concordia, S.A. de C.V. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pablo M. Rivas. http://www.pmrivas.com http://www.r3soft.com.ar

Re: [PHP-DB] Pagination problems

2005-09-02 Thread Pablo M. Rivas
upsss.. y forgot $counter++ $counter=0; while ($row=mssql_fetch_row($rs)) { if (($counter=$start) and ($counter($start+ $Page_Size)) { echo tr; //There you go: Show all fields, one to each cell echo td . implode(/tdtd,$row) . /td; echo /tr\n; } $counter++; } -- Pablo M

Re: [PHP-DB]

2004-09-25 Thread Pablo M. Rivas
under menu so that user put his mouse over the menu and submenu automatically displayed. with best wishes balwant -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Pablo M. Rivas. http://pmrivas.ipupdater.com http

Re: [PHP-DB] Newbie Question - mysql_select_db fails with access denied.

2004-09-24 Thread Pablo M. Rivas
: http://www.php.net/unsub.php -- Pablo M. Rivas. http://pmrivas.ipupdater.com http://www.r3soft.com.ar --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Apache / PHP Page built from a MySQL Database Diplay Problems

2004-08-05 Thread Pablo M. Rivas
Hello Mitch, 1) Have you tried doing SHOW SOURCE in your browser? 2) Take a look at: http://www.php.net/manual/en/function.error-reporting.php Good luck! M Here is the basic scenario: M - Configuration data is gathered from Oracle servers then ftp'd to my M apache / mysql server.

Re: [PHP-DB] Re: sendmail

2004-08-04 Thread Pablo M. Rivas
Hello Aaron, AT Is there any tweaking with mail()? AT I have it working, but it seems to not always send the email. Mainly one AT right after the other. I filling a web form and then sending the data off AT to my email. But then I do a refresh to clear the form and do it again with AT

Re: [PHP-DB] php-db@lists.php.net is currently protecting themselves from receiving junk mail using Spamcease Just this once, click the link below so I can receive your emails.

2004-08-04 Thread Pablo M. Rivas
Hello Josh, JAM What is this? JAM I received this E-Mail, and the link goes to something other than PHP.net JAM [EMAIL PROTECTED] is currently protecting themselves from receiving junk JAM mail using Spamcease Just this once, click the link below so I can receive JAM your emails. JAM You won't

Re: [PHP-DB] Joining Tables for Search

2004-07-26 Thread Pablo M. Rivas
Hello Harry, you can use left join: http://dev.mysql.com/doc/mysql/en/JOIN.html $query = SELECT members.id, firstname, familyname, middlename, fathername, region3.region3, region4, members.country, country.countryname, MATCH(firstname, middlename, familyname,

Re: [PHP-DB] Empty query result

2004-07-26 Thread Pablo M. Rivas
Hello Philip, pse.. can you paste the error information? There is no known empty set problem. -- Best regards, Pablo PT Hi all. PT I am querying a database of single information multiple times using a PT simple 'select' statement. However, whenever the data in the DB is PT empty or

Re[2]: [PHP-DB] Wait Statement... ?

2004-07-20 Thread Pablo M. Rivas
Hello John, sleep() is the brute deffense of the brute force attack... You can make a script that opens simultaneous attacks JWH I'm not saying using sleep is the solution to security problems, but JWH it can be one layer of your defense. -- Best regards, Pablo -- PHP Database

Re[2]: [PHP-DB] Begining PHP...Have Questions

2004-07-19 Thread Pablo M. Rivas
Hello Aaron, why are you using , instead of . ? $query = SELECT * FROM users WHERE email=',$_POST['username'],'; is this a typo?... this sould be: $query = SELECT * FROM users WHERE email='.$_POST['username'].'; or $query = SELECT * FROM users WHERE

Re: [PHP-DB] Help. Mysql Query optimisation not very clever?

2004-07-17 Thread Pablo M. Rivas
Hello Ross, why don't use: explain select . and you'll see what mysql is thinking... ;) -- Best regards, Pablo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Restrict account access to single user

2004-07-15 Thread Pablo M. Rivas
Hello veditio, You can use sessions: http://www.php.net/manual/en/ref.session.php and pay attention to: http://www.php.net/manual/en/function.session-cache-expire.php and session.use_cookies = 0 -- Best regards, Pablo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Column help needed (Table)

2004-07-13 Thread Pablo M. Rivas
Hello Chris, easy as this? ?php $odd=1; while ($row=mysql_fetch_row($Res)) { if ($odd) { echo \ntr; $odd=0; } else $odd=1; echo td . $row[0] . /td; } ? CP Hi there everyone, CP I need my MySQL query to be

Re: [PHP-DB] Multiple SELECT

2004-07-13 Thread Pablo M. Rivas
Hello Marcjon, do this: SELECT forumusers.*, forumuserprofiles.* from .$godlyness['database_database']..forumusers LEFT JOIN .$godlyness['database_database']..forumuserprofiles ON forumusers.username = forumusersprofiles.username where order by so.. if you do: where

Re: [PHP-DB] Storing Date in mysql

2004-07-08 Thread Pablo M. Rivas
Hello Michael, token_date must be a DATE FIELD... http://dev.mysql.com/doc/mysql/en/Column_types.html MG Hello, MG I need to store the date of record / entry in the mysql database, so I have the following table create statement: MG CREATE TABLE `token_table` ( MG

Re[2]: [PHP-DB] Re: MySQL query, using DISTINCT...

2004-07-06 Thread Pablo M. Rivas
Hello Tristan, Select count(id) as howmany, file_name, email from `completed_downloads` where bu='reech' and date BETWEEN '2004-06-01' AND '2004-06-30' group by file_name, email I have a system that tracks downloads, capturing loadsa info, but of interest here, is

Re[2]: [PHP-DB] Dates and Count

2004-07-05 Thread Pablo M. Rivas
Hello Shannon, mmhh.. i think this is simple as: Select * from mytable where nextcontact='$today' and nextcontact='$week' and (custid=3 or custid=5) and (languaje='de' or languaje='en') I'm not sure if it helps, but you can ask again or provide an example... ;) SD Second

Re[2]: [PHP-DB] MySQL: Random select with specific count of a column

2004-07-05 Thread Pablo M. Rivas
Hello Torsten, TR thanks for your help. Unfortunately it's always returning the same row for TR each category (maybe because of the group by) and only one row for each TR category. I need to select 2 random rows for each category. Any more ideas? I'ts returning 2 rows each RECORD, but the

Re: [PHP-DB] More problems with searching

2004-07-01 Thread Pablo M. Rivas
Hello Shiloh, Ideas?... forget the 1 $query = Select * from keyword where ; $words = explode(' ',$_GET['search_text']); foreach($words as $word) { $query .= keyword = '$word' and ; } $query=substr($query,-4); or... $query = Select * from keyword where ; $words = explode('

Re: [PHP-DB] MySQL: Random select with specific count of a column

2004-06-29 Thread Pablo M. Rivas
Hello Torsten, This is one, but I think you can find another one: Supose your table is called tablename select * from tablename as a left join tablename as b on a.category = b.category and a.nameb.name and a.language=b.language where a.language='de' and b.name is

Re: [PHP-DB] Dates and Count

2004-06-28 Thread Pablo M. Rivas
Hello Shannon, SD First, I have two dates stored in a MySQL DB that I want to do a compare on SD and then only display via a web page those records that have a 5 or greater SD day difference in them. What would be the best way to achieve this. Depends on your mysql version... select * from

Re: [PHP-DB] help with consecutive numbers in db

2004-06-24 Thread Pablo M. Rivas
Hello redhat, Hey... look at this: CREATE TABLE `testip` ( `id` int(10) unsigned NOT NULL auto_increment, `theip` varchar(100) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `theip` (`theip`) ) TYPE=MyISAM AUTO_INCREMENT=7 ; SELECT theip, SUBSTRING_INDEX( theip, ., 1

Re[2]: [PHP-DB] help with consecutive numbers in db

2004-06-24 Thread Pablo M. Rivas
Hello Pablo, I made a Typo: change this: while ($key80) echo $lastgroup. . ($key++) . is freebr\n; for this: while ($key255) echo $lastgroup. . ($key++) . is freebr\n; ;) -- Best regards, Pablo -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] Fetch two mysql resource in while loop

2004-06-17 Thread Pablo M. Rivas
Hello sam, Did you try: while($row1=mysql_fetch_row($result1) AND $row2=mysql_fetch_row($result2)) ? or this: while(($row1=mysql_fetch_row($result1)) ($row2=mysql_fetch_row($result2))) ? good luck! P.S. These two actually work... i'm

Re[2]: [PHP-DB] Beta Testers Needed

2004-06-15 Thread Pablo M. Rivas
Hello Kenny, Hans is right, but i'll take the challenge, send me the code and I will look it for a while and tell you... -- Best regards, Pablomailto:[EMAIL PROTECTED] Tuesday, June 15, 2004, 12:17:48 PM, you wrote: HL Yeah, this is a joke, right? HL