RE: [PHP] show a field in php file

2005-07-19 Thread Jay Blanchard
[snip]
what is it wrong to ask questions on a php general mailing list where I 
know there are a bunch of people that can help? I do have a php book 
But it dosent show. Why can other people ask questions but I cant?
[/snip]

It is not that you cannot ask questions, it is that your questions show
a basic lack of research. The answers to the questions you have asked
are easily gotten from the manual, tutorials, and good books on PHP
development. Which book do you have?

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



Re: [PHP] show a field in php file

2005-07-19 Thread Raz
Hey George...

On 19/07/05, Jay Blanchard [EMAIL PROTECTED] wrote:

 It is not that you cannot ask questions, it is that your questions show
 a basic lack of research. The answers to the questions you have asked
 are easily gotten from the manual, tutorials, and good books on PHP
 development. 

For instance, take a look at:
http://www.php.net/manual/en/ref.mysql.php - this is the first page in
the reference manual about mysql. 'bout a third down the page
is...'Example 1. MySQL extension overview example' copy, paste, amend
as required and run. Doesn't work? PHP manual - google -
bookand...

...if then you don't understand, come back and ask - least it shows an
ounce of initiative which is what most on this list would like to see
;)

Raz

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



Re: [PHP] show a field in php file

2005-07-19 Thread John Nichel

George B wrote:

Jochem Maas wrote:


John Nichel wrote:


George B wrote:
snip non-researched basic stuff

http://us2.php.net/manual/en/index.php



:-) anyone care for a php mysql extension:

mysql_do_xml_http_request_bound_richdatagrid([string] query);

george if you want to keep asking questions on NRBS**
then you'll need to change email addrs + name :-)

** from Johns 'non-researched basic stuff' I like the way
the BS comes out ... :-P


what is it wrong to ask questions on a php general mailing list where I 
know there are a bunch of people that can help? I do have a php book But 
it dosent show. Why can other people ask questions but I cant?




It's not that you can't ask questions, it's that it's bad form to ask 
numerous questions to which the answers are well documented.  The people 
on this list aren't here to hold someone's hand or write the code for 
that person; we're here to help solve problems (or ask for help with 
problems of our own).  The questions you have been asking are really 
basic, and if your book doesn't cover the answers, you need to look into 
getting a new book.  The online PHP manual is an excellent place to find 
answers to the questions you've been asking, as is the mailing list 
archives.  This list shouldn't be your first stop when you encounter a 
road block.  Check the manual, the archives, and Google first.  9 times 
out of 10, you'll find your answer there quicker.


--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] show a field in php file

2005-07-19 Thread Jochem Maas

George B wrote:

Jochem Maas wrote:


John Nichel wrote:


George B wrote:
snip non-researched basic stuff

http://us2.php.net/manual/en/index.php



:-) anyone care for a php mysql extension:

mysql_do_xml_http_request_bound_richdatagrid([string] query);

george if you want to keep asking questions on NRBS**
then you'll need to change email addrs + name :-)

** from Johns 'non-researched basic stuff' I like the way
the BS comes out ... :-P


what is it wrong to ask questions on a php general mailing list where I 
know there are a bunch of people that can help? I do have a php book But 


it's just that what you ask and how (coupled with the frequency)
determines the response you get, if any.

your general attitude, the number of posts you answer, etc, etc all
play a part. e.g. as is regularly mentioned you don't argue with Rasmus,
why? because he wrote the original php, still actively develops it, runs
yahoo, and _still_ has time answer posts on this list... basically
he know more than you and has enough 'credits' in phpland to buy the
bank (so to speak) -

...you blew most of your startup 'credits' already, so now you are 'forced'
do a lot of increaseKnowledge() where:

function increaseKnowledge()
{
while (kowledgeSucks()) {
readTheManual();
SearchTheWeb();
writeSomeCode();
}   
}

then come back to the list when you are _really_ stuck and you can
explain the problem and what you have tried so far in _detail_...
if you do that then you'll almost garantee yourself and answer

there are no hard and fast rules regarding this but the consensus
is 'try harder please George' ... basically NRBS** doesn't entice people
to spend time working on _your_ problem.


it dosent show. Why can other people ask questions but I cant?


which book? show what? be specific, do research - google is your friend
(that's beginning to sound like something bigbrother would say).

regarding Why can other people ask questions but I cant? ... er?
that is a question, you asked it, ergo the question moot is moot...
what you should be asking is why other people get better answers ...
hopefully you get that now, anyway good to see you reading other people
threads.

rgds,
Jochem

**Non-Researched Basic Stuff - from John Nichel, eventually I'll be able to
leave off the footnote :-P





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



Re: [PHP] show a field in php file

2005-07-19 Thread John Nichel

Jochem Maas wrote:
snip

**Non-Researched Basic Stuff - from John Nichel, eventually I'll be able to
leave off the footnote :-P


Cool, I've left my mark on history.  An Internet acronym to my credit; 
my life is complete. ;)


--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] show a field in php file

2005-07-18 Thread Jochem Maas

John Nichel wrote:

George B wrote:
snip non-researched basic stuff

http://us2.php.net/manual/en/index.php



:-) anyone care for a php mysql extension:

mysql_do_xml_http_request_bound_richdatagrid([string] query);

george if you want to keep asking questions on NRBS**
then you'll need to change email addrs + name :-)

** from Johns 'non-researched basic stuff' I like the way
the BS comes out ... :-P

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



Re: [PHP] show a field in php file

2005-07-18 Thread John Nichel

George B wrote:
snip non-researched basic stuff

http://us2.php.net/manual/en/index.php

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

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



RE: [PHP] show a field in php file

2005-07-18 Thread Jay Blanchard
[snip]
...a lot of stuff from George
[/snip]

George,

We appreciate that you are asking a lot of questions and hope that you
become a proficient user of PHP. We do recommend that you spend some
time with a tutorial or two (Google is your friend) and a little time
with the manual. Many of your questions are answwered and often there is
more than one way to do things.

Thank you.

To show a field from a query you have to 

a. get the data from a query

$myQuery = SELECT foo FROM table ;
if(!($myResult = mysql_query($myQuery, $myConnection))){
echo mysql_error . \n;
exit();
}

while($myRow = mysql_fetch_array($myResult)){
echo $myRow['foo'] . br\n;
}

b. display the data

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



Re: [PHP] show a field in php file

2005-07-18 Thread vid
Thats just executing the query.. you need to use the result set, and
iterate over it...

$rs = mysql_query($query);
while($row=mysql_fetch_array($rs)) {
 echo $row[0]; ...

}

stuff like that.


 Hey guys how would i show a filed from a MySQL database in a php file?
 Isnt it this?
 SELECT * FROM `user`
 But that dosent work because it comes out blank :-\
 And I already am connected to the database
 Code:

 mysql_connect ('localhost','myaccount','mypass')
   or die (could not connect to server);
 mysql_select_db ('database')
   or die (could not connect to database);

 $query = SELECT *
 FROM `user`
 LIMIT 0 , 30;
   mysql_query($query);

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



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



Re: [PHP] show a field in php file

2005-07-18 Thread George B

Jochem Maas wrote:

John Nichel wrote:


George B wrote:
snip non-researched basic stuff

http://us2.php.net/manual/en/index.php



:-) anyone care for a php mysql extension:

mysql_do_xml_http_request_bound_richdatagrid([string] query);

george if you want to keep asking questions on NRBS**
then you'll need to change email addrs + name :-)

** from Johns 'non-researched basic stuff' I like the way
the BS comes out ... :-P
what is it wrong to ask questions on a php general mailing list where I 
know there are a bunch of people that can help? I do have a php book 
But it dosent show. Why can other people ask questions but I cant?


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