César aracena wrote:
The catch would be to make PHP to auto assign the relatives level by
knowing it has to start from $i=1 and loop $i++ until no other kid is
inserted. Now that I write it, it seems I could use a for loop, but what
should be the structure of it using the $name 0 you told
Friends,
I would like someone to comment upon the paper listed at
http://business.vsnl.com/kalapila/socialrelevance.pdf , that mainly lists out the
social relevance of Free Software, more so in the context of governance.
The comments would also be incorporated in the paper.
CK Raju
the name 0 was a sql-query - it will return a ressource which will
enable you to make something like
$i=0;
while($row = mysql_fetch_assoc($nameless_result){
#psuedo-code#
# mysql_query=(insert into table set relativenumber = 'jr$i' where
ID=$row[ID]);
}
[César L. Aracena] I think
Hi,
I found a bug in php4.2.1 (Windows XP, IIS with php as CGI).
- I have a db-class wich stores the resource-id of a db-connection.
- I have a function (itk_new_db) where I return an object of the class
above and I remember this object in a static-var.
- the second call on that function
Friends,
My earlier mail might not take the link to the intended destination.
The link is http://business.vsnl.com/kalapila/socialrelevance.pdf
Rgds,
CK Raju
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
not a bug in php a bug in my brain.
returning references from functions only works if you have on
function-declaration and call:
$db1 = itk_new_db();
$db1-connect();
$db2 = itk_new_db();
and then it works,
bye,
Michael Bretterklieber schrieb:
Hi,
I found a bug in php4.2.1 (Windows
Hi,
In a server farm, it depends on which machine has the lighter load, MySQL
or PHP.
If you are talking about running on the same machine, probably joining in
MySQL would be faster as it is optimized C code, while PHP is still running
in a virtual machine.
In general, benchmarks are the best
In general, columns are case-insensitive in every relational database I have
tried. However table names might not be.
Regards, John
Gerard Samuel [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hope someone can confirm this.
I was moving a mysql dump to
Good morning, List,
Could somebody help me with the following problem?
When I call the function:
$sql= mssql_query(declare @temp numeric(9) set @temp =
(SELECT MAX(reqNumero)FROM requisicao)+1 insert into
requisicao
(reqNumero,codCliente,reqDataOpen,reqIP,reqHost,reqCriticidade
Php Was installed when installing the Red Hat 7.0 .
Mysql Was installed later from rpm.
Any ideas of what can I do???
Thanks
Fernando
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 23, 2002 3:01 PM
Subject: Re: [PHP-DB] Problem whith
Yes, the actual resolution of how the system is accessed is restricted,
usually the accounts are restricted by user@localhost, however, you
can iirc use user@% for access from anywhere, as part of the grant
statement... you can also change the account's host in the mysql.user
table.
Be carefull
php, is probably resolving localhost, to its' bound external ip,
or something other than 127.0.0.1 (in your hosts file, make
sure that localhost is in it.) or change the user's host in the
mysql.user table to localhost.localdomain, which will work too.
--
you are thinking backwards..
drives 1- computers
tblComputers
iCompID As BigInt Primary Key Autonumber,
sCompName As VARCHAR(25)
...
tblDrives
iDriveID As BigInt Primary Key Autonumber,
iComputerID As BigInt Not Null,
Foreign Key fkDriveComputer (iCompID) References
in this instance, where a computer isn't likely to contain more than
x drives, it may work, however, if he wants to later include sn's,
and mfg's a separate table would be better.. :)
--
===
Michael J. Ryan -
For now, probably more effective to run separate queries, in 4.1 mySQL
is supposed to include stored proc's at least for InnoDB tables, which
would be best of all... and is what I would like to see, in addition to
multiple query/recordset returns...
in MS-SQL/DB2/Oracle, i've created some
usually, stick with one of the following..
all lowercase, all uppercase, Or Always InterCase
or, my personal preference... lblInterCase
Have seen some that will make DB names caps, tbl names lower, and
column names lblInterCase... pick what you want, and go with it, if
you are working with
Hi,
is it possible to force mysql in a SELECT clause depend on a
condition to give no results?
for example:
I do a SELECT and get 3 rows as result,
but one row contains a value, which make the
other rows worthless. and I won't get this results
thank's
sincerely
Martin
Could you give us some examples of entries in the table? You might need to set it up
as a relational database, but we can't know that without information.
Martin C
Martin Adler [EMAIL PROTECTED] 06/24/02 10:47AM
Hi,
is it possible to force mysql in a SELECT clause depend on a
condition to
On Monday 24 June 2002 22:47, Martin Adler wrote:
Hi,
is it possible to force mysql in a SELECT clause depend on a
condition to give no results?
for example:
I do a SELECT and get 3 rows as result,
but one row contains a value, which make the
other rows worthless. and I won't get this
I am trying to do a query on a database on an AS/400. The database is in
DB400 format which is simaluar to DB2. Can PHP access databases in DB400 via
ODBC or does it only work in DB2?
thx,
Mike
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
Have you tried using and ' NOT IN ' statement in your WHERE clause?
There are many comparison operators that you might find useful. They
are covered in 6.3.1.2 of the MySQL Manual, you may also follow this
link : http://www.mysql.com/doc/C/o/Comparison_Operators.html.
If you can't solve this
I am getting an error when inserting data into a mysql database table. It
is telling me that there is a duplicate entry in the database everytime it
gets 10 records inserted to the table, if I flush the table and try it again
it works fine. Is there some kind of limit on some tables? Here is
TIA --
column in your table denotes your primary key? After that, how is it
incremented? Is it auto or do you have some other form of it. I think
your code is correct so the error seems to be how the data ID is generated.
gl -- Seth
Jas wrote:
I am getting an error when inserting data
Here is the db table structure...
CREATE TABLE demo_sessions (
id varchar(255) NOT NULL auto_increment,
ipaddy varchar(255) NOT NULL,
date varchar(255) NOT NULL,
PRIMARY KEY (id)
);
Let me know if this is correct, I have a feeling that the varchar is my
problem but I could be wrong.
Must be an old or broken version of mysql. I'm running 3.23.50 and it won't
even allow the `id' field to be a varchar(255). Change it to int() and
watch the magic.
-Original Message-
From: Jas [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 1:05 PM
To: [EMAIL PROTECTED]
I believe your assumption is correct. VARCHAR is not the best datatype
suitable for indexing. I understand why you want to utilize this type,
so that you are not storing empty characters. I am assuming that the id
column is numerical in nature. In that case, make the data type INT.
This
this bit from my index page is giving me 2 headaches:
1. it isn't passing anything into the URL
2. the page that gets called (name.php) sits and tries to load
forever. it looks like it's even filling up my hard drive with data (?!)
Note: it does this (#2) even if I type in the URL with a
I changed method to GET and the value of $lastname seems to be getting
passed but so is $submit, with the value Search for Last Name as you might
expect. Probably this ain't the answer
Matthew Crouch wrote:
this bit from my index page is giving me 2 headaches:
1. it isn't passing anything
User setup depends on how you configured MS SQL. IIRC, MS SQL defaults
(during installation) to use Windows user accounts. MS SQL is a lot nicer
to work with IMO than MySQL, but I can't justify the $12k+ price tag for a
majority of my operations (unlimited Net license).
-w
--
William Fong -
Hi all,
I have a Cobalt Raq 4 running Linux. I've installed the .pkg file
RaQ3-RaQ4-MySQL-3.23.37-1.pkg I can telnet into the server and I type
mysql, now I see that I'm in MySql, but when I type
bin/mysqladmin -password and put a password in, it just goes to the next
line with a - and a
in you print statement you have ?lastname=%s, shouldn't that be '$s'
denoting a variable being passed? Try that out.
gl -- Seth
Matthew Crouch wrote:
this bit from my index page is giving me 2 headaches:
1. it isn't passing anything into the URL
2. the page that gets called (name.php)
At 14:58 -0400 6/24/02, Page Works Web Solutions wrote:
Hi all,
I have a Cobalt Raq 4 running Linux. I've installed the .pkg file
RaQ3-RaQ4-MySQL-3.23.37-1.pkg I can telnet into the server and I type
mysql, now I see that I'm in MySql, but when I type
bin/mysqladmin -password and put a
Try the PHP documentation, see if it helps. If not, come back with a tiny
bit more detail. The fact that `lastname' and `submit' are both being
passed to the next page is correct, you're not seeing things. $submit is
just another variable in the world of PHP.
Seth Yount wrote:
in you print statement you have ?lastname=%s, shouldn't that be '$s'
denoting a variable being passed? Try that out.
gl -- Seth
Matthew Crouch wrote:
this bit from my index page is giving me 2 headaches:
1. it isn't passing anything into the URL
2. the page that
got my other one sorted out; thanks everyone.
now:
how do i get it so when you hit enter on the keyboard it's the same as
hitting the submit button with the mouse? When I hit enter, it clears
my form and reloads the current page.
--
PHP Database Mailing List (http://www.php.net/)
To
initially I would look at your button type in the source code. Their
are two basic types of buttons, the ' submit ' and the ' clear form '.
If that doesn't work, post back
gl -- Seth
Matthew Crouch wrote:
got my other one sorted out; thanks everyone.
now:
how do i get it so when you hit
On Monday, June 24, 2002, at 01:52 PM, Matthew Crouch wrote:
this bit from my index page is giving me 2 headaches:
1. it isn't passing anything into the URL
2. the page that gets called (name.php) sits and tries to load
forever. it looks like it's even filling up my hard drive with data
You can't have extensions to a filename from the action attribute, period. You have
to either use defined input fields, or hidden fields to pass value from one page to
another.
And just as FYI, you don't need to use the printf() function in your situation, as
it's best used when you need
Because it's not $s in the context of a printf() call. It is %s to denote a
string replacement.
-Mike
- Original Message -
From: Matthew Crouch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 12:41 PM
Subject: [PHP-DB] got it, thanks
Seth Yount wrote:
in
If your form is up to standards, then hitting the enter key on any field, with the
exception of textarea, should submit the form. If you are using an image for your
submit button via the input type=image tag, then you'd have to tab until on the
image before hitting enter for it to work.
HTH
I don't want to start a tangent here, but the most accepted way for
generating HTML with PHP is to NOT generate HTML with PHP. Thus, the
original code should be written like this:
:: BEGIN input.html ::
div style=position: relative; text-align: center;
form method=post action=name.php
input
Hi,
I want to populate two related tables : here is the code
include (connect.php);
$req=select * from tab where num='$mod';
$result=mysql_query($req,$db);
if ($ligne=mysql_fetch_array($result))
//if the data is already there do nothing
hey guys,
im trying to figure out a query that i can return rows from more than
one table at a time. for example, i have two identical tables in structure
and i want to return rows from both using one query. maybe this will help:
select * from table1 and table2 where condition='value'
SQL JOINs...
http://www.mysql.com/doc/J/O/JOIN.html
-Mike
- Original Message -
From: Noah Spitzer-Williams [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 4:21 PM
Subject: [PHP-DB] check two tables at same time?
hey guys,
im trying to figure out a query
MySQL doesn't support subselects.
Look up mysql_insert_id(). It'll return the ID of the last inserted record.
Or just break out the second INSERT statement into one SELECT
and then the actual INSERT.
-Mike
- Original Message -
From: Christine Clerc [EMAIL PROTECTED]
To: [EMAIL
- Original Message -
From: Cosby, Christopher [EMAIL PROTECTED]
I don't want to start a tangent here, but the most accepted way for
generating HTML with PHP is to NOT generate HTML with PHP. Thus, the
original code should be written like this:
Huh? .. most accepted way for
Just a quick follow up...
from http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.1
When there is only one single-line text input field in a form, the user agent
should accept Enter in that field as a request to
submit the form.
and a random link...
Mike,
I know quite a bit about joins and I'm not sure if they are the answer.
Basically I want to save myself two SQL statements.
I'd like to combine:
select * from table1 where cond=val
select * from table2 where cond=sameval
into one sql statement. the two tables
Question:
I want to put PHP code into database fields holding HTML text, how can I
make it execute that PHP before sending to the browser??
Currently, I get the text from MySQL and print it The browser shows
the PHP code mixed into the HTML.
Matthew
--
Anything that can be
exec() the query results.
-Mike
- Original Message -
From: Matthew Tedder [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 2:31 PM
Subject: [PHP-DB] PHP in Database Fields..
Question:
I want to put PHP code into database fields holding HTML text, how can
On Monday 24 June 2002 09:21 pm, [EMAIL PROTECTED] wrote:
exec() the query results.
I can't seem to get that to work... Basically, I want to put my variables
into the code in order to theme HTML code within data base fields.
Consider the following for example:
$glPageFG = #FF;
$mystr =
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I want to put PHP code into database fields holding HTML text, how
can I make it execute that PHP before sending to the browser??
I save the code into a file and save the url of the file into a database and
then just include that file into my
I'm sorry, brainfart.
Don't exec(), eval().
Apologies.
-Mike
- Original Message -
From: Matthew Tedder [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 4:00 PM
Subject: Re: [PHP-DB] PHP in Database Fields..
On Monday 24 June 2002 09:21 pm,
do you have an example of your text. I came across a situation earlier
where I had to build part of my SQL statement. This statement depended
on variables that were generated from PHP.
If you can give me an example of your code, I may be able to help
gl -- Seth
Matthew Tedder wrote:
You are correct in your statements. your SQL statement would look like
this...
$query = mysql_query(SELECT *
FROM Table1, Table2
WHERE Table1.Value = Table2.Value
);
Keep with Christophers original statement.
It is more efficient to not have large echo values.
gl -- Seth
[EMAIL PROTECTED] wrote:
- Original Message -
From: Cosby, Christopher [EMAIL PROTECTED]
I don't want to start a tangent here, but the most accepted way for
generating HTML
56 matches
Mail list logo