http://www.mysql.com/information/benchmarks.html
Gurhan
On Fri, 2002-09-06 at 04:26, :B nerdy wrote:
> anyone know anything about oracle & php at all? =D
>
>
> ":B Nerdy" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > ive been using mysql my whole php l
PHP is a server-side scripting language, there is no way for it to know
what is going on client window, that's a job for Javascript. But if you
are using them in a form you can give them name/value to use them as
form variables which can be used in the form action.
This is a general PHP question,
Hi
you have to restart your mysqld server with
--default-character-set=greek option. You can either do this by
explicitly giving it in the command line when restarting your mysqld, or
you can add that line to your global my.cnf file.
See:
http://www.mysql.com/doc/en/Command-line_options.html
Did you copy and paste the code?
There is no such function as mysql_numrows, it has to be mysql_num_rows.. I
don't know why you didn't get an error for it?
Gurhan
> "Jas" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I am not sure how to resolve this
Does everyone have any experiences connecting to MySQL 4.0.2 through the
socket ? Here is the deal, I have just installed MySQL 4.0.2 as the second
mysqld server on my linux machine, and , to specify which mysql to connect
to , I am trying to connect to 4.0.2 via socket in PHP, i.e.
mysql_connec
Hi,
No you should not report it to anyone. Reserved words can be used as column
names in MySQL (although you shouldn't) provided that they are surrounded by
backticks. When you do it in phpMyAdmin, phpMYAdmin is putting everything
inside backticks , so that this problem won't be encountered.
See:
Hi Chris,
Try SELECT COUNT(DISTINCT(property_name)) .
Gurhan
-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 24, 2002 6:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Weird Distinct bug?
Hi there everyone,
On my linux server I am using:
MySQL 3
That means PHP is not compiled with the MySQL support... Configure it with
mysql support, I bbelieve there were a lot of questions about this in the
list, so you may wanna search the archives..
Gurhan
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, Ma
SELECT LPAD(column_name, '6', '0') FROM table_name;
Gurhan
-Original Message-
From: Morten Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 4:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Zeropadding
Hi,
I use MySQL where I have a table. One of the fields is an INT(6), w
2002 5:41 PM
To: Gurhan Ozen
Cc: Benjamin Walling; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mssql_fetch_array not working?
Do I see a semicolon at the end of the while? that won't work...
On Monday, May 13, 2002, at 04:35 PM, Gurhan Ozen wrote:
> while ($row = mssql_fetch_array($rs
response.
"Gurhan Ozen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi ...
> Get rid of the if($rs) block...
> Just do:
>
> while ($row = mssql_fetch_array($rs));
> {
>echo $row["ItemClassKey"];
&
Hi ...
Get rid of the if($rs) block...
Just do:
while ($row = mssql_fetch_array($rs));
{
echo $row["ItemClassKey"];
echo "";
}
Gurhan
-Original Message-
From: Benjamin Walling [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 5:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP-D
$formattedquote=sprintf("%.2f", $thequote);
See: http://www.php.net/manual/en/function.sprintf.php
Gurhan
-Original Message-
From: Kim Kohen [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 12, 2002 9:59 PM
To: PHP
Subject: [PHP-DB] Word Count, rounding and missing zeros
G'day All,
I'm u
That query doesn't make sense... All you are looking for is to get a
resultset containing ONLY the rows where name is John. So, just write:
SELECT ID, NAME, ADDRESS FROM users WHERE NAME='John';
By the way, in SQL, the wildcard character for regular expressions is the
'%' not '*' .
Gurhan
Jenn,
Get rid of 'value=\"\"' in your code and give it a shot again...
Gurhan
-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 29, 2002 9:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Simple search engine gone bad
Hi all,
It's Monday, it's proba
Ron,
Are we talking about appending new values to the database tables? If yes,
you need to use INSERT INTO ... VALUES syntax ...
If you mean to append the new values to a file , then you need to open the
file in "a" mode.
Gurhan
-Original Message-
From: Ron Allen [mailto:[EMAIL PROT
27;music_artist'( I've got this), I want the id of the
artist they selected in the drop list to be inserted into the
table 'music_album' as $artist_id.
-Original Message-
From: Gurhan Ozen <[EMAIL PROTECTED]>
To: Barry Rumsey <[EMAIL PROTECTED]>, php-db list
Da
Hi Barry,
First of all,
$query_id = mysql_query("INSERT INTO...); is wrong. That line will just
assign the resultset of the whatever mysql_query() function returns to the
variable $query_id .. Get rid of $query_id and just have mysql_query(INSERt
INTO ); See: http://www.php.net/manual/en/func
Hi Leif,
Anytime you get an MySQL error code number use perror program to see what it
is..
[root@atsiz /root]# perror 28
Error code 28: No space left on device
It seems like you don't have enough space to write to your table.
Gurhan
-Original Message-
From: Leif K-Brooks [mailto:[EMA
The tables gets fragmented as deletions, updates take place on a table. If
the DB operations get slower on a table, there is a good possibility that
the table has been fragmented.. If you are using MySQL , you can use CHECK
TABLE or myisamchk periodically to check your tables.
See: http://www.mysq
Hi Arcadius,
If you know Object-oriented programming , you can write a class that
includes both MySQL and PostGreSQL functions and you can inherit from that
class.
Or, you can just stick all mysql, postgresql functions in a functions.php
file and include that file to be able to use the functions.
Ok, if I understood correctly you have two tables one just logs IP addresses
and usernames and another having user information, correct?
If thats the case, just alter your users table to add an IP column (and
user name column as well if needed) and use INSERT INTO ... SELECT ...
syntax to populat
Hi Jenn,
Since the function mysql_num_rows returns an integer, you can't just say if
(mysql_num_rows($result)) ...
Try to get the number of the rows and write an if statement according to
that, or you can use something like
while(mysql_fetch_array($result))
{
.
}
Gurhan
-Original Message
What are you trying to do? an where is your pattern? are you trying to match
any character followed by 2 to 20 any characters in the $string variable?
Gurhan
-Original Message-
From: Ilhan Guvener [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 07, 2002 11:33 AM
To: [EMAIL PROTECTED]
Su
Hi Djordie,
You need to have the connection to the DB in your php script
leksikon_in.php .
Gurhan
-Original Message-
From: Djordje Gacesa [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 07, 2002 9:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] help with insert needed
Hello, everybody!
Hi Andy,
That statement won't work because you have to provide the possible values
for the enum colummn. Say you can only have Y or N or that field, that you
need to type:
ALTER TABLE `test` CHANGE `field` `field` ENUM('Y','N');
By the way, if you have 250 different possible entries , I would sa
/1005/fid/436
Gurhan Ozen
MCI WorldCom
Quality Assurance Team
[EMAIL PROTECTED]
ph: 703-449-4754
Vnet: 228-4754
AIM: Greywolf1923
-Original Message-
From: Marij Bellen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 04, 2002 9:57 AM
To: Php-Db@Lists. Php.Net (E-mail)
Subject: Re: [PHP
Hi Jenn,
There are a couple ways you can do this.
You can write a unix shell script and run it periodically at the cron.
Here:
#!/bin/mysql
query="DELETE FROM tablename"
/usr/bin/mysql -u USER -pPASSWORD -D database -e "$query"
And then you can just put this script into cron, see:
http://www
I don't know if you can do in one INSERT INTO statements per se in Oracle,
try to separate insert into statements with semicolon(;) .. Or if you will
insert the data that is already in another table you can use INSERT INTO
... SELECT ... FROM ... syntax.
Gurhan
-Original Message-
From:
Hi,
Did you copy and paste your code?IF yes, I have noticed a problem on the
code you posted.. Y
The line:
$run_query = ($maxid,$db_connect);
will fail as you didn't put the function name in. Rewrite it as:
$run_query = mysql_query($maxid,$db_connect);
Gurhan
-Original Message-
Fro
Hello Tom,
First of all, since you are keeping the filepaths and filenames you don't
need to worry about any of the filesystem functions.. You just need to
replace variables in the right places in your output HTML code.
As for how to implement what you need, I will give you a different tip.
Wr
ok it is 1:37 am here and i have been up since 6:00 am (the day before) and
have to be awake ths mornign again at 6:00 am so if I make any mistakes
trying to answer your question, please take it easy:)
I was wondering if you'd wanna use temporary tables to accomplish it..
You may wanna do:
CREA
Hi,
Why don't you add another column to your "items" table for the item
name..Then you can just fetch each row to an array and call it by
$row["item_name"] ?
For better explanation:
Say you added a column to hold item names in your items table called
item_name ...
I have no idea how you query i
Hi Gary,
I didn't understand what you were actually trying to do here.. You stated
that "Our goal here is to minimize the number of database connections per
function call." but seems like you are connecting to the database in the
constructor? So each instance will automatically connect to the DB??
play 10 results per page, but that doesnt work when
you want to do a ORDER BY rand() query.
"Gurhan Ozen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> are you just looking for a way to display 10 results per page? If yes
then
> y
Hi Jane,
No questions are lame.
The statement you wrote down wouldn't work as IFNULL() function doesn't work
the way you intended. See
http://www.mysql.com/doc/C/o/Control_flow_functions.html for this..
I would accomplish it in two statements. Here it is:
SELECT (@a:=(CASE box1 WHEN '' THEN NOW
you can do it by using distinct function ..
Do:
SELECT DISTINCT(city) FROM addresses;
Gurhan
-Original Message-
From: Kevin Diffily [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 2:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SQL Question
Hello,
I have a simple SQL Ques
are you just looking for a way to display 10 results per page? If yes then
you can just use LIMIT to limit your result to 10 .. So, for the first page,
you can do "SELECT LIMIT 1, 10;" and for the second page "SELECT ...
LIMIT 11, 20" etc etc .
You can sure use "ORDER BY" with "LIMIT" to t
Leif,
IF i understood this correctly you would like to add up the values of a
particular column and return it to PHP with a different name right?
You can do:
$query="select sum(column_name) as nameyouwant from tablename"; // this will
return the sum of the column in a column called nameyouwant
$r
and osx to do this. The question is what
would be the fastest way.
I never heared of unix shell scripting, but I asume it is something what
youwould call a batch file in win or apple script on mac.
Thanx again for your help.
Andy
"Gurhan Ozen" <[EMAIL PROTECTED]> schrieb im Ne
Hi Andy,
The little snippet you showed from the text file made me think that the data
layout for each country is not consistent.
For example:
For Algeria there is the country name and right underneath goes the info
about yellow fever and malaria as opposed to American Samoa where underneath
the c
Hi,
Can u please give us more information?? Are you trying to insert data into
database or pull data out of database.. Also can you show the queries you
are using???
Thanks,
Gurhan
-Original Message-
From: Dave carrera [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 12:38 PM
Jas,
You still have cars as your checkbox name.. change it to id..
and make sure that you assign $table_name to the table name you want to
delete from in your done2.php3 file..
Gurhan
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 3:28 AM
To: [E
archar(30),
car_year varchar(15),
car_price varchar(15),
car_vin varchar(25),
dlr_num varchar(25),
PRIMARY KEY (id),
KEY id (id)
test VALUES ('1', 'Ford', 'Bronco', '1969', '4500', 'vin897655', 'none');
Sorry abo
Jas..
First of all you don't have the variable $cars assigned..
Second of all, we still don't know what the "test" table looks like? Does it
only have one column with all the infos about cars populated in it???
Gurhan
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Thursda
Not enough information given to figure out what's going on, but looking at
your query i see:
"WHERE $cars =
"$car_type\",\"$car_model\",\"$car_year\",\"$car_price\",\"$car_vin\",\"$dlr
_num\"");
do you keep 6 different values separated by commas in the field referenced
by $cars??? If this is
Hi Jenn,
The code looked ok to me , so I copied and pasted the code you posted and it
worked for me.. Where are you getting the parsing error? Is it the whole
code anyway?
Gurhan
-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 9:33 A
That's a pretty naive question to ask. For what specific task do you want to
compare them ? Besides if you can't write a comparison article on PHP vs.
JAVa , how can you set the outcome in PHP's favor?
I would advise you to sit down and try to do the task both in Java and PHP
, and compare both
Yes you sure can,..
When you insert a row just use one of the older values that no longer exists
on the table.. Alternatively, you can insert a blank value, mysql will
automatically set it to the next value after the highest one in the table
and then you can update it to one of the older values.
addslashes(), stripslashes(), strip_tags(), nl2br() , htmlspecialchars()
etc. etc ...
check PHP online documentation for more info on them..
But even without those functions, the data inserted thru form wouldn't crash
MySQL .. The worst that can happen is if the data has quotes or wrong format
et
Hi
I have never used it but sounds like analog would fit your needs pretty
well. Check them out at:
http://analog.sourceforge.net/
Hope this helps..
Gurhan
-Original Message-
From: Peter Lovatt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 6:29 PM
To: [EMAIL PROTECTED];
You need to install data source name at :
Start --> Settings --> Control PAnel --> Data Sources(ODBC)
Gurhan
-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 2:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Connecting to ms acces dba
SELECT * FROM table WHERE COLUMN_NAME NOT LIKE '%unwanted_String%';
when the field type is number you can use
SELECT * FROM table WHERE COLUMN_NAME != unwanted_number;
or
SELECT * FROM table WHERE COLUMN_NAME <> unwanted_number;
Gurhan
-Original Message-
From: Dave Carrera [mailto:[EM
Andy,
You can do it with PHP's strtolower() function..
See:
http://www.php.net/manual/en/function.strtolower.php
Gurhan
-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 11:08 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Converting upper case lett
if ( ($variable > 1 ) && ($variable < 5) )
echo "hello";
or alternatively,
for ($i=2; $i < 5; $i++)
{
if ($variable=$i)
echo "hello";
}
Gurhan Ozen
MCI WorldCom
Quality Assurance Team
[EMAIL PROTECTED]
ph: 703-449-4754
Vnet: 228
Yeah I didn't notice that..
VALUES must not be there . it should be :
set days_member=days_member+1
thanks for pointing that out:)
Gurhan
-Original Message-
From: Lokesh Verma [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 5:12 PM
To: Gurhan Ozen
Subject: Re: [P
Try it without quotes around days_member and 1.
Gurhan
-Original Message-
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 4:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Update
Hi,
I am having problems with this code. I want to update a members numbe
mysql_connect() function only takes 3 arguments (servername, username, pass)
.
Select your database by using mysql_select_db() function...
Try to rewrite the code as:
mysql_connect($db["host"],$db["user"],$db["password"]);
mysql_select_db($db["database"]);
Refer to:
http://www.php.net/manual/en/
Jas...
What errors are you getting? What do you have inside your db_connection.inc
file? Do you have the path for db_connection.inc inside the require()
function correct?
Give us more insights to be able to find out what the problem is..
Gurhan
-Original Message-
From: jas [mailto:[EMA
atement on the top of each page that needs the db
connectiong? Please correct me if I am wrong, I have never really used
class files for my own scripts before.
Thanks again.
"Gurhan Ozen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Are yo
Are you trying to write classes to connect to the database using PHP's
native DB connection functions?? If yes, you should only check those
database functions' tutorials and just use them inside your class..
Gurhan
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday,
Hi kevin,
Seems like in your while loop, you are not populating your list array
correctly with all the emails you have.
Try to have a count value and populate the array list accordingly such as:
$count = 0;
while ($row = mysql_fetch_row($result))
{
$real_name = $row[1];
$
The actual content of the .php files won't be seen from the net since it is
server side scripting language.. But if you are still concerned you can put
database connection info into another file (preferably .php file) and place
it somewhere outside your web directory and access it thru require() o
Hi Shelly,
It is just the old trick. You can get the time at the beginning of the page
and at the end of the page and just calculate the difference in between two.
Since the default timeout value in PHP is 30secs. it will probably be a
short timeperiod so you can probably you use time() function w
Hi Howard,
I didn't fully understand your question.. Wouldn't you rather have the
server upload the file automatically without asking the user where to save
it?
You can do it by using PHP's FTP functions.. See:
http://www.php.net/manual/en/ref.ftp.php
Gurhan
-Original Message-
From: How
Kamil,
If getting info in your private email is making you so pleased maybe you
shoudl never post any questions here, it is contradictory to the philisophy
of the list.
I have also asked about inserting / retrieving pictures in mysql database
in past and I have received so many con replies that
Jamie,
The main problem here is , you are selecting the rows that are some null
values. mysql_fetch* doesn't return any null columns. Yes, you read it
right, if you have a table with say, 5 columns and if 3 columns in a row are
null then you'll only have 2 columns that are not null .
Make sure t
You don't have anything to write to the file.. mysql_query() function
returns true or false, it doesn't return the actual qurey result you'd see
in mysql monitor. You have to use some other functions such as
mysql_fetch_array(), mysql_num_rows() to retrieve the data before you can
write it into a
Seems like it will NOT work because you are selecting $car which is already
chosen by the user (i.e. which is a known value). I don't know how you laid
out your table but shouldn't your query be something like "SELECT price from
FROM varetabell where carid=$car" ??
Gurhan
-Original Message
Hi All,
I am currently looking for a reliable web host to host my personal website.
I know there are millions of web hosting companies that have PHP and MYSQL
support but I just can't trust any of the fully-assured and confident
webhosting ads anymore. I would like to get a service from a compa
I think i narrowed down the problem and know what is wrong, and just
solved the problem:). The problem wasn't with mysql or php it was because of
my poor i should say object-oriented skill. I will tell why I had this
problem so that it might be a good reference for someone else who are likely
to
urhan
-Original Message-
From: Richard S. Crawford [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 06, 2002 3:34 PM
To: Gurhan Ozen; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mysql_num_rows
Hm, if the result you want is the number of distinct nodeid values, why not
use a query like this:
&q
[mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 06, 2002 3:01 PM
To: Gurhan Ozen; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql_num_rows
It would help if we could see the actual query. It sounds like the problem
is a syntax error in the query itself.
At 11:52 AM 1/6/2002, Gurhan Ozen wrote:
>
Hi everyone,
I have a problem with mysql connectivety which is making me nuts. If the
query is "select blah, blah from table" (i.e. without where clause)
mysql_num_rows returns the right number, but when i put in a query with
where clause, although there are rows returned, PHP is giving:
"Warni
74 matches
Mail list logo