And finally get the last field name :
$field = mysql_field_name($result, $nFields -1); // 0 based list;
HTH
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Rubanowicz, Lisa <[EMAIL PROTECTED]>
Para: 'Cahyo S. Aji' <[EMAIL PROTECTED]>;
<[EMAI
I've never used it but php has functions to deal with "flat file databases"
like this one. There is an example on "PHP Professional Programming", a book
of Wrox.
HTH.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Jason Beebe <[EMA
Look for empty lines, html tags,"echoes" or "prints" before the cookie
session is tried, even in include files and clear them.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: JB <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>; <[E
I'm using tinyint. If you are afraid of data volume I think char(1) with
"T/F" values uses less disk space but requires more sophisticated code to
deal with.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Cal Evans <[EMAIL PROTECTED]>
Pa
yme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: sarahana <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: domingo, 14 de janeiro de 2001 14:04
Assunto: [PHP-DB] Desperate Help needed
Hi,
I made a database chatroom that seemed to be working perfectly fine -
second one takes more time to download the page but fills the fields
combobox faster than the first. If the database tables are updated very
often the second option can't be used.
HTH
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Miguel Loureiro <[EMAIL P
Check if the 'php_interbase.dll' is present and in the proper location.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Kyoungsub, Wee <[EMAIL PROTECTED]>
Para: PHP DB Mailing <[EMAIL PROTECTED]>
Enviada em: quarta-feira, 17 de janeiro de 2001
in
every line you must build a page taking care of this matter in the php
script .
HTH.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: sarahana <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sexta-feira, 19 de janeiro de 2001 01:41
Assunto: [PH
USERID (foreign key, use the definition from user's table )
This way you can store all user's preferences .
$query = "select USERCHOICE from Preference where USERID = $user" ;
This query gets the preferences from a defined user.
HTH.
Jayme.
http://www.conex.com.br/jjeffm
I am running PHP3.017(cgi) + Apache + MySQL on Windows98 SE.
The include() and the getenv() functions are asking for a dial-up
connection. Can somebody give me a hand ?
Jayme.
http://www.conex.com.br/jjeffman
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail
H
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Rubanowicz, Lisa <[EMAIL PROTECTED]>
Para: Rubanowicz, Lisa <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Enviada em: terça-feira, 23 de janeiro de 2001 11:54
Assunto: RE: [PHP-DB] Newbie - 2 tables one insert
> I
The last time I sent a message to php-list-admin asking for stop this kind
of messages they took the email address off but I was fired of the list too.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Jon Niola <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]&
row number returned :
// Check if a valid result has records
if(mysql_num_rows($result) > 0){
// stuff
}
else{
// No records procedure
}
HTH
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Kevin Connolly <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Env
There is the "nl2br()" function too :
// From php manual :
nl2br -- Converts new lines to HTML line breaks.
Description
string nl2br(string string);
Returns string with '' inserted before all new lines.
HTH
Jayme.
http://www.conex.com.br/jjeffman
-Mensa
even JavaScript ?
Jayme.
http://www.conex.com.br/jjeffman
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
I attempt it but the browser told me it was a illegal operation !
TIA
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Beau Lebens <[EMAIL PROTECTED]>
Para: JJeffman <[EMAIL PROTECTED]>; PHPDB <[EMAIL PROTECTED]>
Enviada em: terça-feira, 30 de jan
I think it might be $this->deptree ! Every time you create an object the "$"
is replaced by "$this->" .
HTH.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: <[EMAIL PROTECTED]>
Para: Andrew <[EMAIL PROTECTED]>; <[EMAIL P
If you are running PHP3 in a Windows environment, check if you have enabled
php3_mysql.dll in the Windows Extensions session of the php3.ini file.
HTH.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Devang P. Shah <[EMAIL PROTECTED]>
Para: <[EMAIL PROTE
> if ($result == 0);
You have a wrong semicolon at the end of the line above.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Marc Bragg <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sábado, 3 de fevereiro de 2001 20:44
Assunto: [PHP-DB
I think write to the user's machine it's up to him, you can't write to it,
you have to "invite" the user to download the file you created for him on
the server. That's the polished application !
HTH.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem O
What for you need a ID if you have already the username which I guess may a
unique key ?
HTH.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Brandon Feldhahn <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: segunda-feira, 5 de fevereiro d
aScript arrays and
refresh the select boxes using JavaScript scripts. Otherwise you must reload
the page and process the values posted by the form.
HTH.
Jayme.
http://www.conex.com.br/jjeffman
-Mensagem Original-
De: Kepa Lyman <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
E
he same .
Auto-increment fields should not be exposed to the user.
HTH.
Jayme.
http://www.conex.com.br/jjeffman
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
You need mix JavaScript and PHP. I've an example at
www.eletromaster.com.br/produto.html . Have a look .
HTH
Jayme.
www.conex.com.br/jjeffman
-Mensagem Original-
De: John Halladay <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: terça-feira, 13 de fevere
How about use "
Para: PHP DB List (E-mail) <[EMAIL PROTECTED]>
Enviada em: quinta-feira, 15 de fevereiro de 2001 19:46
Assunto: [PHP-DB] Related frames
> I'm trying to have a link in one frame display data in the main frame.
Here
> is an example of what I have set up. Normally in HTML you would
Using a JavaScript function instead of the "action" form property I think is
possible .
HTH.
Jayme.
-Mensagem Original-
De: Marc Bragg <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sexta-feira, 16 de fevereiro de 2001 17:53
Assunto: [PHP-DB] double "posts"
>
> Is it possib
No it hasn't. The field order in the form doesn't matter, but the order you
use their values in the query yes !
I don't know what kind of operation you're making on the database
updating, inserting, etc. ).
If you are inserting you must not give any member_id, as long as it is
generated by the
I'm sorry I made a mistake here. You can't make double posts.
Jayme.
-Mensagem Original-
De: JJeffman <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sexta-feira, 16 de fevereiro de 2001 19:46
Assunto: Re: [PHP-DB] primary field
> No it hasn'
Try this way :
"select t1.memberID,t1.choice,t2.memberID, t2.choice from table as t1, table
as t2 where t1.choice = 2 and t2.choice =3"
It works, but you'll going to have as many records as the bigger number of
records between choice=2 and choice = 3, no matter you use the distinct
keyword or n
You can pass the "href" as an urlencoded to your php script.
HTH.
Jayme.
-Mensagem Original-
De: Sridhar Ranganathan <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sábado, 17 de fevereiro de 2001 21:40
Assunto: [PHP-DB] Links On The Fly
> Hi All
>
> I have a search engine w
MySQL do support composite keys . Have a look on the mysql database
structure the "columns_priv" table has 5 fields in its primary key.
I think you should use an auto_increment as your primary field instead.
HTH.
Jayme.
-Mensagem Original-
De: Russ Michell <[EMAIL PROTECTED]>
Para: <[E
Try use a delimited string and split it on retrieve.
HTH.
Jayme.
-Mensagem Original-
De: Kyle Mathews <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: segunda-feira, 19 de fevereiro de 2001 19:35
Assunto: [PHP-DB] Inserting arrays into a database
> Hello:
>
> I'm wondering wh
"SELECT * FROM Table WHERE Rec_id > $recid LIMIT 1" always bring you the
next record no matter the Rec_id is.
HTH
Jayme.
-Mensagem Original-
De: Adv. Systems Design <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: terça-feira, 20 de fevereiro de 2001 11:41
Assunto: [PHP-DB] ret
I've already made an object which had a property that was an array. Now I
need to have an array that can hold objects as its elements is It possible ?
I didn't get it the expression array[$i]->Object gave me syntax error. Any
tips ?
[]'s
Jayme.
http://www.conex.com.br/jje
You need mix JavaScript and PHP. Write an "OnChange" event handler for the
"campus" selection list and fill up the "buildings" drop-down menu in two
ways:
1) If the amount of data is not very large you can get all data needed to
run
the "application" client side, load the data into JavaScript arr
As far as I know, if you do not set any special order, the table is ordered
by primary key, isn't it ?
Jayme.
-Mensagem Original-
De: Chris Book <[EMAIL PROTECTED]>
Para: JJeffman <[EMAIL PROTECTED]>; Adv. Systems Design
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]
e space.
>
> Bob
>
>
>
> At 05:00 PM 2/21/01 -0500, you wrote:
> >Perhaps it is ordered that way, perhaps not, but live by the creed
"Expect
> >nothing and you will never be disappointed."
> >
> >Go ahead and specify the order you demand
Look for "nl2br()" on the php manual. There is more information there.
Any way you can store text fields as the user has typed it in, when you are
about to show them what they wrote you get text from database and apply the
function on the result before put it in a html tag.
select * ...
...
$tex
..
$current = $row["field"] ;
// for next row
$query = "select * from table where field_name > '$current' limit 1";
// for previous row
$query = "select * from table where field_name < '$current' limit 1";
HTH
Jayme.
www.conex.com.br/jjeffman/an
echo("");
HTH
Jayme.
-Mensagem Original-
De: Julio Cuz, Jr. <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: quinta-feira, 22 de fevereiro de 2001 18:33
Assunto: [PHP-DB] SELECT problem
> Hi--
>
> What's wrong with this line of code?
>
> echo(" NAME='campus'>");
>
>
>
> Julio
Remember, php is server side while JavaScript is client side. You can't use
php client side. You can use some client side events to call php scripts
which will run on the server and send data to the browser. Events are client
side, so try JavaScript you'll enjoy it too.
HTH
Jayme.
-Mensagem
Are you trying to tell Rudi Ahlers is possible to call php scripts from a
browse event ? The statement "form.submit()" belongs to JavaScript not to
php.
Can you imagine how boring is have to submit forms and reload pages every
time the user make changes on a drop down menu?
I know you're right
That's what I've been telling to who asked about filling drop down lists at
run time: When the amount of data is small you can generate JavaScript
arrays to hold it otherwise you MUST reload the page to run your php script
to fill up drop down lists.
HTH.
Jayme.
-Mensagem Original-
De:
Have a look on PHP manual there is good information on mail functions,
setcookie function, and other stuff.
HTH
Jayme.
-Mensagem Original-
De: Matthew Cothier <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: domingo, 25 de fevereiro de 2001 17:13
Assunto: [PHP-DB] cookies, email
The statement exists in MySQL and as far as I know works perfectly.
I couldn't try it because my ISP had disabled it for security matters. But
it works as described on the MySQL manual .
HTH.
Jayme.
-Mensagem Original-
De: Miles Thompson <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Env
The PHP function "get_browser()" extract many of the client browser
characteristics but not the screen resolution !
PHP experts tells not to use JavaScript so you have two choices:
1st. Do not make a good adaptive design, with horizontal scroll bars or
tile background images, and tell the user
David Siegel in "Creating Killer Web Sites" 1st edition said frames are good
only for show details of a list of objects like recipes, products or in your
case news!
You can have a frameset with three frames say top, left and main (center).
Put some ad on the top , the headlines of your news on the
The action you want is only available using JavaScript.
You need to submit the form without a submit button.
The "" tag has the "OnChange" event which is scriptable. You can use
the JavaScript statement "this.form.submit();" associated with the
"OnChange" event.
... ...
...
HTH
Jayme.
-M
The event "OnChange" only happens when the user open the drop down list and
change ( select ) a new value, this is not "just looking" .
I don't like this kind of solution. If I have to put a button on the page I
think the selection list must disappear. Why not give the user a interface
with less
I think you must execute two queries, one to have the "numbers" on the top
frame and another to fill a list of links on the left page. You can
configure the URL source of the frame pages, passing URL parameters to
execute each query, based on the result of your previously submitted form :
1. Subm
Look for "load in file" on MySQL manual.
HTH.
Jayme.
-Mensagem Original-
De: Pedro M. S. Oliveira <[EMAIL PROTECTED]>
Para: PHP db <[EMAIL PROTECTED]>
Enviada em: sábado, 3 de março de 2001 18:03
Assunto: [PHP-DB] Insert a file in a mysql database!
> Hi all...
> Here i am once again a
Use the "selected" attribute of the tag when you load the second
page, marking the place the user had chosen :
City G
Para: <[EMAIL PROTECTED]>
Enviada em: sábado, 3 de março de 2001 04:29
Assunto: [PHP-DB] How do I keep the selected showing...
> Hi All
> I have a fully functional db site whic
You must use a loop to show each row of your query.
"mysql_fetch_array($result)" only get the current row.
while($row = mysql_fetch_array($result) ){
// do something
}
The "mysql_fetch_array" function returns an associative array where you can
use the field names to have access to its val
Have you put an echo with mysql_error() after performing each query ?
Jayme.
-Mensagem Original-
De: Chris <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: segunda-feira, 5 de março de 2001 05:04
Assunto: [PHP-DB] MySQL - Problem with multiple INSERTs?
> Howdy,
>
> I'm gettin
Try this changes:
$con_id = mysql_connect("localhost", "myusername", "mypassword");
if($con_id){
mysql_db_query("DocCountry", "INSERT INTO projects (idCreator, name,
comment) VALUES (0, 'sysmsg9.txt', 'Some file')");
mysql_db_query("DocCountry", "INSERT INTO files (idProject, name,
commen
I've never used but there is a php function "get_browser()" which might do
the work.
I think the best way is set the cookie and try to get it again, if you can
get it the user has cookies enabled.
setcookie("name",value,$cookieLifeTime,$cookiePath);
if($name) echo("Cookie is enabled");
HTH
Jaym
If you have a way to decide which checkboxes have to be checked, just set
its attribute like the line bellow:
>
HTH
Jayme.
-Mensagem Original-
De: jester <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: quarta-feira, 7 de março de 2001 14:00
Assunto: [PHP-DB] (Newbie) how to e
You can't have links in a selection list you have to use another interface
object like anchor tags ()
while(){
echo("Link description");
}
HTH
Jayme.
-Mensagem Original-
De: Liz Bander <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: quarta-feira, 7 de março de 2001 15:03
I'm not sure but I think you must have a smtp server program running to
configure as your smtp server.
HTH.
Jayme.
-Mensagem Original-
De: Free Beachler <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: quarta-feira, 7 de março de 2001 14:48
Assunto: [PHP-DB] mail server
> hi
-Mensagem Original-
De: Marc Bragg <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sábado, 10 de março de 2001 14:46
Assunto: [PHP-DB] help on modifications / subscribe / unsubscribe script
> Am using the following subscribe/unsubscribe script with great success,
> but it does
Use mysql_error() can give a hint of what is going wrong.
$result = mysql_query($query) or die( mysql_error());
HTH
Jayme.
-Mensagem Original-
De: Oson, Chris M. <[EMAIL PROTECTED]>
Para: Jim Ray <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Enviada em: sábado, 10 de março de 2001 16:57
Use or die( mysql_error()) on every mysql function
or command you're performing, this will tell you what is going wrong .
HTH
Jayme.
-Mensagem Original-
De: <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Enviada em: quarta-feira, 14 de março de 2001 19:47
Assun
If the tables have a one to many relationship you can use nested while
loops:
while(1st loop){
// display header - master table
while(2nd loop){
// display features - detail table
}
}
HTH
Jayme.
-Mensagem Original-
De: olinux <[EMAIL PROTECTED]>
Para: PHP-DB <[EM
Get the "die" statement off, and check if your query succeeds, if no, let
the
rest of script go ahead :
$db = @mysql_pconnect ();
if( $db){
$query = """;
}
// here goes the rest
HTH
Jayme.
-Mensagem Original-
De: Chris Vargas <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED
Try the "empty($variable)" function.
HTH
Jayme.
-Mensagem Original-
De: Michael Gerholdt <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sábado, 17 de março de 2001 23:12
Assunto: [PHP-DB] if () and () - newbie Q
> Why won't this work for me?
>
> if (($rectype == 'events') a
Create a variable to concatenate the item values adding a "\n" character
between them :
$result = $item1."\n".$item2."\n".$item3 ;
.
echo("");
HTH
Jayme.
-Mensagem Original-
De: Martin Skjöldebrand <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: segunda-feira, 19 de março
$this->field = $row['$this->field'];
}
}
else $this->error = mysql_error();
return;
}
HTH
Jayme.
www.conex.com.br/jjeffman/antispam.html
-Mensagem Original-
De: bryan <[EMAIL PROTECTED]>
Para: db <[EMAIL PROTECTED]>
Enviada em: terça
If you are using MySQL you can use the "mysql_list_fields" to get the fields
names from a table.
HTH
Jayme.
-Mensagem Original-
De: Martin E. Koss <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: terça-feira, 20 de março de 2001 12:02
Assunto: [PHP-DB] Dynamically build a form
Have a look on Sessions. You can also write to a database every time a new
visitor runs into your site and check if the other are still connected.
You have to create a script that tracks every movement of the visitor. It is
not a simple script. As far as I know the web server doesn't give you thi
As you can only navigate record by record through the database table I think
the only way, as far as I know, is to store the record values into array
variables and print it to the page after you'd reached the last record.
HTH
Jayme.
-Mensagem Original-
De: olinux <[EMAIL PROTECTED]>
Par
A good advice is put an error checker after every mysql command, this way
you can track errors :
> include("../includes/connect.inc.php"); file://connect to the
database
> $query = "SELECT m_sender, m_date, m_subject FROM messages WHERE m_id =
> '$m_id'";
> $result = mysql_query($query ,
I don't know if you need a special class to send an email, the php mail
function do this in a way you can read it on every browser or email program
.
HTH
Jayme.
-Mensagem Original-
De: Xsarus Internetdiensten <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sexta-feira, 23 de ma
Congratulations !! Very good solution ! Simple and efficient !
Cheers,
Jayme.
-Mensagem Original-
De: Michael Rudel <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>; 'PHP-DB mailinglist' <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Enviada em: sexta-feira, 23 de março de 2001 08:29
Assunto: RE
I didn't understand you, the page you pointed is just like your page, record
by record one just after the other. It has only a link to reorder the query
by another field.
HTH
Jayme.
-Mensagem Original-
De: olinux o <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sexta-feira, 2
Look for "AddType application/x-httpd-php4" on your Apache configuration
file and add the types you want PHP4 be responsible for.
Here are my own :
AddType application/x-httpd-php4 .php
AddType application/x-httpd-php4 .php3
AddType application/x-httpd-php4 .html
HTH
Jayme.
-M
Remember it only works on PHP4.0 !
HTH.
Jayme.
-Mensagem Original-
De: olinux <[EMAIL PROTECTED]>
Para: PHP-DB <[EMAIL PROTECTED]>
Enviada em: sexta-feira, 23 de março de 2001 23:38
Assunto: Re: [PHP-DB] comparison table script
> Cool!
> Just came across this, looks like PHP will make
Use persistent connections it's a matter of performance of your script.
When you use persistent connections the next call to mysql_pconnect will
catch a opened connection if available. The mysql_connect command always
open a new connection which slower than get an opened one. Anyway you can't
use
You've misplaced a "$date" variable instead of $datum, $date has no value .
HTH
Jayme.
-Mensagem Original-
De: Florian Poppele <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: domingo, 25 de março de 2001 10:26
Assunto: [PHP-DB] problem with writing date/time into db
> Just
I don't know Postgresql, but all databases I've dealt with increments
auto-increment fields only on committing insert commands. I think you can
catch the last id number (MySQL do it) and show the number + 1 on the user
screen.
HTH
Jayme.
-Mensagem Original-
De: Julio Cuz, Jr. <[EMAIL PR
You haven't to repeat the name field in the telephone numbers table. This
table needs another primary key which is not "id".
"id" is the foreign key that allow you to have a one to many relationship.
It can be (IMHO):
Client table:
CLIENT_ID NAME
FoneNumber table:
FONE_IDFONENUMBER
80 matches
Mail list logo