You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(28) |
Jun
(54) |
Jul
(68) |
Aug
(34) |
Sep
(20) |
Oct
(62) |
Nov
(58) |
Dec
(77) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(91) |
Feb
(101) |
Mar
(73) |
Apr
(107) |
May
(56) |
Jun
(43) |
Jul
(68) |
Aug
(31) |
Sep
(35) |
Oct
(50) |
Nov
(20) |
Dec
(37) |
2004 |
Jan
(17) |
Feb
(3) |
Mar
(2) |
Apr
(7) |
May
(3) |
Jun
(11) |
Jul
(8) |
Aug
(22) |
Sep
(10) |
Oct
(9) |
Nov
(17) |
Dec
(6) |
2005 |
Jan
(14) |
Feb
(11) |
Mar
(6) |
Apr
(30) |
May
(17) |
Jun
(57) |
Jul
(18) |
Aug
(18) |
Sep
(32) |
Oct
(49) |
Nov
(19) |
Dec
(40) |
2006 |
Jan
(48) |
Feb
(68) |
Mar
(74) |
Apr
(92) |
May
(90) |
Jun
(60) |
Jul
(25) |
Aug
(47) |
Sep
(36) |
Oct
(64) |
Nov
(57) |
Dec
(21) |
2007 |
Jan
(74) |
Feb
(24) |
Mar
(49) |
Apr
(37) |
May
(56) |
Jun
(27) |
Jul
(23) |
Aug
(24) |
Sep
(24) |
Oct
(58) |
Nov
(13) |
Dec
(9) |
2008 |
Jan
(41) |
Feb
(16) |
Mar
(53) |
Apr
(19) |
May
(53) |
Jun
(20) |
Jul
(44) |
Aug
(12) |
Sep
(19) |
Oct
(22) |
Nov
(64) |
Dec
(14) |
2009 |
Jan
(16) |
Feb
(37) |
Mar
(30) |
Apr
(24) |
May
(3) |
Jun
(14) |
Jul
(39) |
Aug
(30) |
Sep
(38) |
Oct
(10) |
Nov
(9) |
Dec
(30) |
2010 |
Jan
(27) |
Feb
(9) |
Mar
(8) |
Apr
(38) |
May
(17) |
Jun
(2) |
Jul
(15) |
Aug
(3) |
Sep
(9) |
Oct
(3) |
Nov
(14) |
Dec
(6) |
2011 |
Jan
(1) |
Feb
(14) |
Mar
(18) |
Apr
(7) |
May
(3) |
Jun
(5) |
Jul
(3) |
Aug
|
Sep
(3) |
Oct
(3) |
Nov
(3) |
Dec
(2) |
2012 |
Jan
(2) |
Feb
(2) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(4) |
Nov
(5) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Joseph A. <ja...@za...> - 2002-06-27 18:37:03
|
Hi folks I am wondering what the situation of PHP on Chicago's job market is? Thanks to all. Joseph Azaryayev Zacks Investment Research (312)630-9880 ext.396 |
From: JP H. <jp...@xs...> - 2002-06-27 17:51:19
|
Hi folks, I have an interesting thing happening in an application I wrote. There is a user form (pure HTML) in a folder that is world visible (workreq/index.html). It posts to a script in a folder that is realm protected (workreq/priv/formproc.php). Upon submission, formproc.php takes the submitted data and works it a little, posts it to a database and then sends a "thank you page" (workreq/priv/thankyou.html) to the browser. Here's the interesting thing; when the thankyou.html page is displayed in the browser window, the location bar says [usual stuff]/workreq/priv/formproc.php. I would just as soon not have it say anything different than [usual stuff]/workreq/index.html Or at the very least, [usual stuff]/workreq/priv/thankyou.html What can be done to change what the location bar displays? Any thoughts? Regards, JP Honeywell |
From: Richard L. <ce...@l-...> - 2002-06-18 20:06:43
|
Although nobody has said Yay or Nay to being there, I'll swing by Type A tonight, and meet up with whomever shows up... -- Like Music? http://l-i-e.com/artists.htm My hard drive crashed on April 28th... Re-send any critical email. |
From: Walter S. / C. Inc. <wa...@ch...> - 2002-06-17 19:41:57
|
Saravanan, Congrats on the successful 'C' extension to PHP. I'm sure that was an = experience!! -Walter |
From: Saravanan <sar...@na...> - 2002-06-17 12:47:52
|
Hi all, I have just successfully extended PHP with my own module written in C. I have been trying it out for the past few days. I got info from the site http://php.brainpeddlers.com/manual/ja/zend.build.php. I have got a small how-to also for this. If any one would like to have it, pls let me know. I vl send that to ur personal ID. Regards Saravanan |
From: Richard L. <ce...@l-...> - 2002-06-14 03:58:52
|
>1. Is some one know how to change file nema when user will save file? >Not downloadable file, I read a file and send it to users' browser! >The header("Content-Disposition: inline; filename=downloaded.pdf"); is >works only for download :( What? I don't understand the distinction between a "downloadable file" and one you send to their browser... If you send it to my browser, I'm downloading it. Perhaps what you *REALLY* want, though, is to have the URL end in the file name that you desire to be "Save As..." For example, if your URL ends in "foo.xyz", then I *THINK* most browsers will use "foo.xyz" as the default name to save it as. Of course, you then have the Microsoft *BUG* in *some* versions of IE that it insists on determining Content-type: by the *URL* rather than your headers, which is just plain stupid, but that's Microsoft... At any rate, options include: Adding "bogus" filename to end of URL to "fool" browser: http://nogenre.com/index.htm/foo.xyz The *REAL* file is index.htm, but the 'foo.xyz' part might fool some browsers. Using 'foo.xyz' as your filename, and forcing Apache (assuming you're not using some stupid thing like IIS or PWS) to treat that file as a PHP file. http://uncommonground.com/events.pdf This file, which behaves like a PDF, is *ACTUALLY* a PHP file generating a PDF. In .htaccess, I have this: <Files events.pdf> ForceType application/x-httpd-php </Files> Of course, the "application/x-httpd-php" part depends on what your ISP chose as a mime-type for PHP. application/x-httpd-php is standard, but they could have chosen *ANY* stupid combo they felt like doing: application/php application/httpd-php application/module-php microsoft/sucks >2. Is there is some way to use this code bellow in https mode? > > >if($fd = @fopen ($filename, "r")){ > $contents = fread ($fd, filesize ($filename)); > fclose ($fd); >} >if($contents){ > Header ("Content-type: $extensions_array[$extension]"); > Header ("Content-Length: " . strlen($contents)); >} HTTPS doesn't give a damn about what PHP code you have or the server response or the kind of file you have or any of that. HTTPS *ONLY* alters the transportation of the HTML (or whatever) from server to browser, not the actual content itself. It just PGP encrypts (well, not really, but close enough for arguments' sake) whatever your server spews out. If a page "works" in HTTP, but not in HTTPS, your httpd.conf file is mis-configured for HTTPS somehow. -- Like Music? http://l-i-e.com/artists.htm My hard drive crashed on April 28th... Re-send any critical email. |
From: Richard L. <ce...@l-...> - 2002-06-13 22:21:24
|
>function list_cols($table) { >global $mysql_database; global $connection; >$fields = mysql_list_fields($mysql_database, $table,$connection ); >$columns = mysql_num_fields($fields); >for ($i = 0; $i < $columns; $i++) { $field_name[$i] = >mysql_field_name($fields, $i);} >return $field_name; >} > > >I seem to get errors like this, off this code: >Warning: Unable to save MySQL query result in >/backup/home2/titaniu/public_html/temp/orion/func.inc.php on line 418 http://www.php.net/manual/en/faq.databases.php#faq.databases.upgraded It's *ALSO* possible that you are simply asking for *WAY* too much data... I don't see how, in this code... Most likely, though, the version of MySQL that you compiled with PHP, and the version you are actually RUNNING are not exactly the same. A lot of stuff will work "fine" like that, but then you try to use some function that actually "changed" in between versions, and Bam! it won't work. -- Like Music? http://l-i-e.com/artists.htm My hard drive crashed on April 28th... Re-send any critical email. |
From: Joseph A. <ja...@za...> - 2002-06-13 18:24:16
|
1. Is some one know how to change file nema when user will save file? Not downloadable file, I read a file and send it to users' browser! The header("Content-Disposition: inline; filename=downloaded.pdf"); is works only for download :( 2. Is there is some way to use this code bellow in https mode? if($fd = @fopen ($filename, "r")){ $contents = fread ($fd, filesize ($filename)); fclose ($fd); } if($contents){ Header ("Content-type: $extensions_array[$extension]"); Header ("Content-Length: " . strlen($contents)); } Thanks to all. Joseph Azaryayev Zacks Investment Research (312)630-9880 ext.396 |
From: Adam H. <mac...@ea...> - 2002-06-13 00:38:35
|
function list_cols($table) { global $mysql_database; global $connection; $fields = mysql_list_fields($mysql_database, $table,$connection ); $columns = mysql_num_fields($fields); for ($i = 0; $i < $columns; $i++) { $field_name[$i] = mysql_field_name($fields, $i);} return $field_name; } I seem to get errors like this, off this code: Warning: Unable to save MySQL query result in /backup/home2/titaniu/public_html/temp/orion/func.inc.php on line 418 Warning: Supplied argument is not a valid MySQL result resource in /backup/home2/titaniu/public_html/temp/orion/func.inc.php on line 419 |
From: Richard L. <ce...@l-...> - 2002-06-11 22:05:31
|
>Was wondering how one would go about uploading files in a directory >using PHP and HTML. I've got an interface to upload individual >files (images) using the <input type="FILE"> tag, but in the >instance where there're ten or more files from the same directory to >upload, this gets tedious. No can do. You can let them have multiple FILE uploads, but not a whole directory: <INPUT TYPE=FILE NAME=upload[]><BR> <INPUT TYPE=FILE NAME=upload[]><BR> <INPUT TYPE=FILE NAME=upload[]><BR> <INPUT TYPE=FILE NAME=upload[]><BR> <INPUT TYPE=FILE NAME=upload[]><BR> <INPUT TYPE=FILE NAME=upload[]><BR> <INPUT TYPE=FILE NAME=upload[]><BR> <INPUT TYPE=FILE NAME=upload[]><BR> <INPUT TYPE=FILE NAME=upload[]><BR> <INPUT TYPE=FILE NAME=upload[]><BR> If they need to upload a whole mess of stuff, teach them to use FTP, or WinZip so they can zip first and upload one big file. -- Like Music? http://l-i-e.com/artists.htm My hard drive crashed on April 28th... Re-send any critical email. |
From: Richard L. <ce...@l-...> - 2002-06-11 20:34:29
|
Hey all -- Just want to be sure there will be more than just me there on Tuesday, June 18th... Anybody got anything in particular they wanna talk about? -- Like Music? http://l-i-e.com/artists.htm My hard drive crashed on April 28th... Re-send any critical email. |
From: Al A. <bro...@xn...> - 2002-06-11 20:11:57
|
Hello. Was wondering how one would go about uploading files in a directory using PHP and HTML. I've got an interface to upload individual files (images) using the <input type="FILE"> tag, but in the instance where there're ten or more files from the same directory to upload, this gets tedious. TIA -Al |
From: Richard L. <ce...@l-...> - 2002-06-11 00:13:22
|
I have a client using OS Commerce, and I'm having a tough time with a couple things... #1. Some visitors end up getting a "Page Not Available" when trying to create an account. I think it's tied to IE 5.50 and I *think* it's because there's so damn many tep_redirect() calls going on that it just gets tired of it... Anybody got any idea? #2. We need a "Samples $2.50" button for most, but not all, of the products. What's the best way to make OS Commerce do this? -- Like Music? http://l-i-e.com/artists.htm My hard drive crashed on April 28th... Re-send any critical email. |
From: Richard L. <ce...@l-...> - 2002-06-10 22:10:39
|
>Hello all, > > I have a problem. Hope one of u can take the pain of >helping me out. I am running php4.0.6 in RH 6.2 and >apache 1.3.19. > > My problem is, I have compile a small c code >consisting of a simple function that outputs hello >world and compiled it into a .so (share object) file. >Now when I try to dynamically load the .so file using >the dl() function, i get the following error message. > >Warning: Invalid library (maybe not a PHP library) >'libhello.so' in /var/www/work/test.php on line 3 > >/var/www/work is my docuemnt root and test.php is the >name of the php file i wrote. > >Can someone help me out please?? PHP .so files have additional function wrappers and stuff that make them, like, .so files on steroids, I think. The best samples are buried in the talks from Rasmus here: http://conf.php.net -- Like Music? http://l-i-e.com/artists.htm My hard drive crashed on April 28th... Re-send any critical email. |
From: Richard L. <ce...@l-...> - 2002-06-08 22:16:10
|
>I recently ran into a problem. I have an array of restricted collumns. I >want to compare that array, to another array, and remove the restricted >collumns. I've tried it several ways, including using in_array, eregi, and >stistr, but none seem to work. > > >$restricted_cols = >array( >0 =>'recruiter', >1 =>'active', >2 =>'address', >3 =>'address', >4 =>'zip', >5 =>'home_phone', >6 =>'cell_phone', >7 =>'email', >8 =>'contact_time', >9 =>'current_employer', >10=>'notes', >11=>'password', >12=>'employername', >13=>'employername2', >14=>'employername3', >15=>'blind_notes', >16=>'resume',); > > >$var['recruiter'] = $row->recruiter; >$var['id'] = $row->id; >$var['active'] = $row->active; >$var['name'] = $row->name; reset($restricted_cols); $copy = $var; while (list(,$key) = $restricted_cols)){ unset($copy[$key]); } If you really need it to be a function for some reason: function remove_items(&$a, &$restricted_cols){ reset($restricted_cols); while (list(,$key) = $restricted_cols)){ unset($a[$key]); } } -- Like Music? http://l-i-e.com/artists.htm My hard drive crashed on April 28th... Re-send any critical email. |
From: Adam H. <mac...@ea...> - 2002-06-08 00:17:17
|
I recently ran into a problem. I have an array of restricted collumns. I want to compare that array, to another array, and remove the restricted collumns. I've tried it several ways, including using in_array, eregi, and stistr, but none seem to work. $restricted_cols = array( 0 =>'recruiter', 1 =>'active', 2 =>'address', 3 =>'address', 4 =>'zip', 5 =>'home_phone', 6 =>'cell_phone', 7 =>'email', 8 =>'contact_time', 9 =>'current_employer', 10=>'notes', 11=>'password', 12=>'employername', 13=>'employername2', 14=>'employername3', 15=>'blind_notes', 16=>'resume',); $var['recruiter'] = $row->recruiter; $var['id'] = $row->id; $var['active'] = $row->active; $var['name'] = $row->name; $a = array_keys($var); $a = remove_items($a,$restricted_cols); function remove_items( $a , $n ) { $i = 0; $n = implode($n,' '); if ( strlen($n) != 0 ) { while ( list($key,$el) = each($a) ) { //if ( eregi("$n","$key") == TRUE) { continue; } if ( eregi("$n","$el")== TRUE) { continue; } $d[$key] = $el; $i++; } return $d; } else { return $a; } } |
From: Richard L. <ce...@l-...> - 2002-06-07 22:20:25
|
>I know there has to be a way to abstract this with a loop or >function or something. Abstract what?... The field names? http://php.net/mysql should list several "field" functions. And the %s is scaring me... Why not just put in the values? It really isn't that big a deal, and honestly, you can just put it all on or two very long lines. There isn't any super-tricky logic going on here. It's just shuffling unremarkable data from point A to point B. Why complicate that? Use the time and energy to validate the data before the insert, and be sure you're not getting hacked. -- Like Music? http://l-i-e.com/artists.htm My hard drive crashed on April 28th... Re-send any critical email. |
From: Joseph A. <ja...@za...> - 2002-06-07 20:31:45
|
As you know, Yahoo starts make money from POP access to email accounts. This is very nice program I discovered on SourceForge allow to you free POP3 access :-) http://sourceforge.net/project/showfiles.php?group_id=52835&release_id=9 2170 Joseph Azaryayev Zacks Investment Research (312)630-9880 ext.396 |
From: Nicholas G. <ni...@ne...> - 2002-06-07 19:46:33
|
> -----Original Message----- > Behalf Of JP Honeywell > Sent: Friday, June 07, 2002 1:08 PM > Subject: [chiPHPug-discuss] How to abstract this? > > I know there has to be a way to abstract this with a loop or > function or something. > > Any thoughts? > > $addStmt = "Insert into $tableName(IPAddress, > ContactName, > ContactEmail, > ContactPhone, I'm just learning PHP from CF. In ColdFusion, a big SQL statement like that could be dynamically generated from a structure or an array. In pseudocode, array_of_fieldnames = "contactFirstName, contactEmail, contactPhone..."> array_of_values = "Jane, ja...@do..., (312) 555-1212..."> INSERT INTO $tableName ( <loopOver array_of_fieldnames -1> #thefieldname#, <endLoop> #thelastFieldname#) // no comma here VALUES ( <loopOver array_Of_values - 1> '#thevalue#', </endLoop> '#theLastValue#') // no comma here Things to watch for: the SQL commas, obviously. Also, make sure you're aware of how your database receives its values. Dates, strings, numbers pending on the db have different notation requirements ( 'string', 1234, {odbcdatetypes} ) which can make abstractions like this less simple. |
From: JP H. <jp...@xs...> - 2002-06-07 18:07:32
|
Hi folks, I know there has to be a way to abstract this with a loop or function or something. Any thoughts? $addStmt = "Insert into $tableName(IPAddress, ContactName, ContactEmail, ContactPhone, Department, Building, Location, Room, Description, DateRequested, DateSubmit, TicketStatus, AuthBy, AuthPhone, AcctNum, EstimateReq, EstPaint, EstElectrical, EstCarpenter, EstBoiler, EstOffice, EstHousekeeping, EstMoving, EstGrounds, EstimateLog, ReviewedBy, Supervisor, AssignPaint, AssignElectrical, AssignCarpenter, AssignBoiler, AssignOffice, AssignHousekeeping, AssignMoving, AssignGrounds, Worker, AddInfo, WorkLog) values('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')" ; |
From: David M. <da...@su...> - 2002-06-06 14:05:06
|
Adam, Read Richard's post again. If the data in the column is 0 (or other things) like your "current_salary" column, then your $result[$c] == TRUE is returning false. I think if you follow Richard's suggestions, things will work out just fine. dm Adam Hallett said: > This is the actual row taken from the sql client > you might have to copy it into a word processing program, as it has a > very long line. > > > +-----------+----+--------+----------+------------------+----------+-------+> -------+------------+------------+----------------+--------------+---------+> ------------+---------------------+-----------+-----------------------------> ---------------+----------------+----------------+-----------------+--------> ----------+-----------------------+----------------+----------------+-------> -----+----------+-------------------+--------+-------------+----------------> + > | recruiter | id | active | name | address | city | > state | zip | home_phone | cell_phone | email | contact_time > | citizen | authorized | education | specialty | skills > | job_preference | current_salary | expected_salary | current_employer > | geographic_preference | interview_date | availible_date | experience > | licenced | licence_suspended | felony | malpractice | notes > | > +-----------+----+--------+----------+------------------+----------+-------+> -------+------------+------------+----------------+--------------+---------+> ------------+---------------------+-----------+-----------------------------> ---------------+----------------+----------------+-----------------+--------> ----------+-----------------------+----------------+----------------+-------> -----+----------+-------------------+--------+-------------+----------------> + > | jane | 6 | a | John Doe | 1234 some street | SomeTown | AK > | 12345 | 911 | 911 | jd...@in... | any time | > y | y | Read a couple books | Quackery | Making sugar > pills look like real medicine | full | 0 | > 8388607 | Self Employed | AK FL AZ CO | whenever | > 0000-00-00 | None | n | y | y | y > | This is a test | > +-----------+----+--------+----------+------------------+----------+-------+> -------+------------+------------+----------------+--------------+---------+> ------------+---------------------+-----------+-----------------------------> ---------------+----------------+----------------+-----------------+--------> ----------+-----------------------+----------------+----------------+-------> -----+----------+-------------------+--------+-------------+----------------> + > > > This is the script. > > <? > include('mysql_connect.inc.php'); > > > $r = mysql_query("select * from candidates where id = '6'"); > $f = 0; > while ($row = mysql_fetch_array ($r)) > { > while ( $row[$f] == TRUE ) { > > $var[$f] = $row[$f]; > $f++; > } > > } > > echo implode($var,'--'); > ?> > > This is the output I get > > jane--6--a--John Doe--1234 some > str...@in...--any > time--y--y--Read a couple books--Quackery--Making sugar pills look like > real medicine--full > > It isn't the whole result. > > Trying this with mysql_fetch_object, returns the same thing > It doesn't return the whole row.. :\ > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > chiPHPug-discuss mailing list > chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiphpug-discuss -- Sus4 Web Hosting www.sus4.net |
From: Adam H. <mac...@ea...> - 2002-06-06 00:36:06
|
This is the actual row taken from the sql client you might have to copy it into a word processing program, as it has a very long line. +-----------+----+--------+----------+------------------+----------+-------+ -------+------------+------------+----------------+--------------+---------+ ------------+---------------------+-----------+----------------------------- ---------------+----------------+----------------+-----------------+-------- ----------+-----------------------+----------------+----------------+------- -----+----------+-------------------+--------+-------------+---------------- + | recruiter | id | active | name | address | city | state | zip | home_phone | cell_phone | email | contact_time | citizen | authorized | education | specialty | skills | job_preference | current_salary | expected_salary | current_employer | geographic_preference | interview_date | availible_date | experience | licenced | licence_suspended | felony | malpractice | notes | +-----------+----+--------+----------+------------------+----------+-------+ -------+------------+------------+----------------+--------------+---------+ ------------+---------------------+-----------+----------------------------- ---------------+----------------+----------------+-----------------+-------- ----------+-----------------------+----------------+----------------+------- -----+----------+-------------------+--------+-------------+---------------- + | jane | 6 | a | John Doe | 1234 some street | SomeTown | AK | 12345 | 911 | 911 | jd...@in... | any time | y | y | Read a couple books | Quackery | Making sugar pills look like real medicine | full | 0 | 8388607 | Self Employed | AK FL AZ CO | whenever | 0000-00-00 | None | n | y | y | y | This is a test | +-----------+----+--------+----------+------------------+----------+-------+ -------+------------+------------+----------------+--------------+---------+ ------------+---------------------+-----------+----------------------------- ---------------+----------------+----------------+-----------------+-------- ----------+-----------------------+----------------+----------------+------- -----+----------+-------------------+--------+-------------+---------------- + This is the script. <? include('mysql_connect.inc.php'); $r = mysql_query("select * from candidates where id = '6'"); $f = 0; while ($row = mysql_fetch_array ($r)) { while ( $row[$f] == TRUE ) { $var[$f] = $row[$f]; $f++; } } echo implode($var,'--'); ?> This is the output I get jane--6--a--John Doe--1234 some str...@in...--any time--y--y--Read a couple books--Quackery--Making sugar pills look like real medicine--full It isn't the whole result. Trying this with mysql_fetch_object, returns the same thing It doesn't return the whole row.. :\ |
From: Tamara A. <ab...@ab...> - 2002-06-06 00:35:40
|
Question from Adam: Has anyone ever used mysql_fetch_array or mysql_fetch_row when I do it,it doesn't return the full row, just half while ( $row = mysql_fetch_row($r) ) { $c=0; while ( $row[$c] == TRUE ) { echo $row[$c]; $c++; } } Thanks! |
From: Adam H. <mac...@ea...> - 2002-06-06 00:35:36
|
This is the actual row taken from the sql client you might have to copy it into a word processing program, as it has a very long line. +-----------+----+--------+----------+------------------+----------+-------+ -------+------------+------------+----------------+--------------+---------+ ------------+---------------------+-----------+----------------------------- ---------------+----------------+----------------+-----------------+-------- ----------+-----------------------+----------------+----------------+------- -----+----------+-------------------+--------+-------------+---------------- + | recruiter | id | active | name | address | city | state | zip | home_phone | cell_phone | email | contact_time | citizen | authorized | education | specialty | skills | job_preference | current_salary | expected_salary | current_employer | geographic_preference | interview_date | availible_date | experience | licenced | licence_suspended | felony | malpractice | notes | +-----------+----+--------+----------+------------------+----------+-------+ -------+------------+------------+----------------+--------------+---------+ ------------+---------------------+-----------+----------------------------- ---------------+----------------+----------------+-----------------+-------- ----------+-----------------------+----------------+----------------+------- -----+----------+-------------------+--------+-------------+---------------- + | jane | 6 | a | John Doe | 1234 some street | SomeTown | AK | 12345 | 911 | 911 | jd...@in... | any time | y | y | Read a couple books | Quackery | Making sugar pills look like real medicine | full | 0 | 8388607 | Self Employed | AK FL AZ CO | whenever | 0000-00-00 | None | n | y | y | y | This is a test | +-----------+----+--------+----------+------------------+----------+-------+ -------+------------+------------+----------------+--------------+---------+ ------------+---------------------+-----------+----------------------------- ---------------+----------------+----------------+-----------------+-------- ----------+-----------------------+----------------+----------------+------- -----+----------+-------------------+--------+-------------+---------------- + This is the script. <? include('mysql_connect.inc.php'); $r = mysql_query("select * from candidates where id = '6'"); $f = 0; while ($row = mysql_fetch_array ($r)) { while ( $row[$f] == TRUE ) { $var[$f] = $row[$f]; $f++; } } echo implode($var,'--'); ?> This is the output I get jane--6--a--John Doe--1234 some str...@in...--any time--y--y--Read a couple books--Quackery--Making sugar pills look like real medicine--full It isn't the whole result. Trying this with mysql_fetch_object, returns the same thing It doesn't return the whole row.. :\ |
From: Richard L. <ce...@l-...> - 2002-06-06 00:01:59
|
>Has anyone ever used mysql_fetch_array or mysql_fetch_row >when I do it,it doesn't return the full row, just half Yes and no. The "missing" pieces are the NULL values in your tables, almost for sure, or else they are fields with 0, or the empty string, or... I use mysql_fetch_row all the time, and it works as documented. >while ( $row = mysql_fetch_row($r) ) { >$c=0; >while ( $row[$c] == TRUE ) { $row[$c] might be *ANY* of the following and stop this loop: NULL 0 '' '0' false (if MySQL has a boolean type, which I'm not sure it does...) >echo $row[$c]; >$c++; >} >} Don't test for == TRUE. Just do this: while ($row = mysql_fetch_row($r)){ echo implode(" ", $row), "<BR>\n"; } Or this: while (list($column1, $column2, $column3, ...) = mysql_fetch_row($r)){ echo "c1 $column1, c2 $column2, ...<BR>\n"; } Of course, if you know what's in the table, you want much better variable names than $column1 In fact, if you *EVER* type "... == TRUE", you are doing something wrong. :-) -- Like Music? http://l-i-e.com/artists.htm My hard drive crashed on April 28th... Re-send any critical email. |