[PHP-DB] Re: Getting Percentage of coloumn value

2002-07-10 Thread JJ Harrison
Here is my script: ? include includes/required.php; do_html_header('Name Here'); $query = select @total_items=count(id) from tececo_stats; $query1= select referer,count(referer)/@total_items from tececo_stats group by referer; $result = mysql_query($query) or die(Query failed: $querybr .

[PHP-DB] php problem passing variables

2002-07-10 Thread richard . mail
hi, i've tryed to install php 4.2.1 with apache 1.3.24 php works, but i can't pass any variables. is it in php.ini that i have to change something ? or is the installation of php not correct ??.. thanks in advance, Richard Pijnenburg The netherlands -- PHP Database Mailing List

RE: [PHP-DB] Re: Getting Percentage of coloumn value

2002-07-10 Thread joakim . andersson
?php include includes/required.php; do_html_header('Name Here'); $query = select count(id) as num_rows from tececo_stats; $result = mysql_query($query) or die(Query failed: $querybr . mysql_error()); $row = mysql_fetch_array($result); $query = select referer,(count(referer) / {$row['num_rows']}

RE: [PHP-DB] php problem passing variables

2002-07-10 Thread joakim . andersson
This doesn't look like a database question to me... Anyway, try $_POST['variable_name'] if the variable comes from a form with the POST-method $_GET['variable_name'] - Form using GET-method or passing variables in the URI (mypage.php?variable_name=42) Regards Joakim Andersson -Original

Re: [PHP-DB] Problem whith mysql_connect()

2002-07-10 Thread Marcel Schindler
Fernando Gonzalez [EMAIL PROTECTED] wrote Php Was installed when installing the Red Hat 7.0 . Mysql Was installed later from rpm. Any ideas of what can I do??? write this script ?php phpinfo(); ? save and start it through your browser. Check the following parts: CONFIGURE COMMAND: Is

[PHP-DB] catch warnings?

2002-07-10 Thread Gabor Niederlaender
Hi all! This is not a typical DB-Question, but I hope you give me some hints either... If I insert a String instead of a date(f.Ex) into the DB, I get a Warning: MS SQL message: Syntax error converting datetime from character string. (severity 16) How can I catch these warnings in PHP? Best

RE: [PHP-DB] catch warnings?

2002-07-10 Thread Peter Lovatt
look at http://www.php.net/manual/en/function.mssql-get-last-message.php Peter --- Excellence in internet and open source software --- Sunmaia www.sunmaia.net [EMAIL PROTECTED] tel. 0121-242-1473

Re: [PHP-DB] catch warnings?

2002-07-10 Thread Adam Alkins
Hi all! This is not a typical DB-Question, but I hope you give me some hints either... If I insert a String instead of a date(f.Ex) into the DB, I get a Warning: MS SQL message: Syntax error converting datetime from character string. (severity 16) How can I catch these warnings

Re: [PHP-DB] catch warnings?

2002-07-10 Thread Michael Bretterklieber
Hi, try SELECT @@ERROR as errorcode bye, Adam Alkins schrieb: Hi all! This is not a typical DB-Question, but I hope you give me some hints either... If I insert a String instead of a date(f.Ex) into the DB, I get a Warning: MS SQL message: Syntax error converting datetime from character

[PHP-DB] Re: Great tool

2002-07-10 Thread Marcel Schindler
César aracena [EMAIL PROTECTED] wrote: Hi all. I found in one of these DB lists a word about a tool called MySQL - Front so I went there, downloaded it and ran it today for the first time and well... ¡¡TWO THUMBS UP!!! It really seems like a great GUI app. I installed it over Win XP

[PHP-DB] Load data

2002-07-10 Thread Natividad Castro
Hi to all, I changed Linux from version 7.2 to 7.3 and now when I try to load data using LOAD DATA LOCAL INFILE I got the following error: The used command is not allowed with this MySQL version. I enable --local-infile=1 But I'm still getting the same error. Any help, is greatly appreciate it

RE: [PHP-DB] A Simple Question

2002-07-10 Thread Adam Royle
Just a correction you can use arrays with querystrings page.php?var1[]=firstvar1[]=secondvar1[]=third $var1 Array ( [0] = first [1] = second [2] = third ) OR page.php?var1[]=firstvar2[2]=secondvar2[]=third $var 1 Array ( [0] = first ) $var2 Array ( [2] = second

[PHP-DB] Great tool

2002-07-10 Thread César Aracena
Hi all. I found in one of these DB lists a word about a tool called MySQL - Front so I went there, downloaded it and ran it today for the first time and well... ¡¡TWO THUMBS UP!!! It really seems like a great GUI app. I installed it over Win XP Pro and had no troubles with it so far.

Re: [PHP-DB] Great tool

2002-07-10 Thread Manuel
You may also want to try: EMS MySQL Manager. I've been using both of them and I like the EMS GUI better. It seems to work better and has more features. César_Aracena wrote:Hi all. I found in one of these DB lists a word about a tool called MySQL - Front so I went there, downloaded it and ran

[PHP-DB] Date comparison problem

2002-07-10 Thread Gabor Niederlaender
Hi all! I have got a datetime field in a MS-SQL DB, and I have a date field in my html-form with the format: DD/MM/. I would like to compare the two, but I think the two formats are a bit different and they do not really want to be compared:) If I write a query to write out the datetime

[PHP-DB] behavior of mysql_pconnect()

2002-07-10 Thread levik
I'm wondering how the mysql_pconnect() function is SUPPOSED to behave. I have a script that gets hit fairly heavily (about 150K times a day), that uses mysql. In order to save some time in execution, I have made it use mysql_pconnect() rather than mysql_connect(). Persistent connections are

RE: [PHP-DB] Date comparison problem

2002-07-10 Thread Ryan Jameson (USA)
This is how I do it: date(m/d/Y,strtotime(odbc_result($rs,ts))) where $rs is the result set and ts is the name of the field containing the datetime. Ryan -Original Message- From: Gabor Niederlaender [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 8:21 AM To: [EMAIL

[PHP-DB] Graphing data

2002-07-10 Thread chip . wiegand
Is there any application available that can take data from my mysql database and draw graphs? I am using mysql/php on FreeBSD. -- Chip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Problems getting data from database

2002-07-10 Thread Chip Atkinson
Greetings, I built php 4.2.1 and am having database access troubles. The problem shows up with either the php module for apache/stronghold or the command line/standalone version of php, so I've been using the stand alone version. I believe that my syntax and test program is correct, because a

Re: [PHP-DB] Graphing data

2002-07-10 Thread Ray Hunter
I have used jpGraphs with tons of success. These are functions or classes that you can call in your php code... http://www.aditus.nu/jpgraph/ -- RAY HUNTER - Original Message - From: [EMAIL PROTECTED] To: PHP_DB [EMAIL PROTECTED] Sent: Wednesday, July 10, 2002 9:41 AM Subject:

[PHP-DB] Calculating inside query?

2002-07-10 Thread andy
Hi there, I would like to find out the top 10 of some ratings. There are 2 columns. One for the rating and one for the amount of ratings. To find out the top 10 I would have to divide those 2 values and sort it. Somehow this does not work. I do not have a clue why. Maybe someone of you guys do

RE: [PHP-DB] Calculating inside query?

2002-07-10 Thread Ryan Jameson (USA)
i assume you're using MySQL because of the Limit clause, but what error are you receiving? -Original Message- From: andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 10:34 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Calculating inside query? Hi there, I would like to find

Re: [PHP-DB] Calculating inside query?

2002-07-10 Thread andy
there is no error, it just does not pull out the right values. Just puts out 10 listings and the top10 column (as I named it by alias) contains no value. I am using mysql. maybe this has to do somehting with the alias? Ryan Jameson [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL

RE: [PHP-DB] Calculating inside query?

2002-07-10 Thread Ryan Jameson (USA)
do both of the fields contain values and are they both numeric? It sure seems strange to me. I actually created a test and it worked fine, just copied your query. Ryan -Original Message- From: andy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 10:48 AM To: [EMAIL PROTECTED]

[PHP-DB] Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread Michael Zornek
I was using phpMyAdmin to do an export from one machine to another and on import I got an error: Error SQL-query :  CREATE TABLE hospital ( id smallint(5) unsigned NOT NULL auto_increment, heath_system_id smallint(5) unsigned default NULL, name_long tinytext NOT NULL, name_short

RE: [PHP-DB] Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread Ryan Jameson (USA)
desc is a key word. :-\ -Original Message- From: Michael Zornek [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 10:50 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Mysql syntax error - phpMyAdmin ?? I was using phpMyAdmin to do an export from one machine to another and on import

RE: [PHP-DB] Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread Ryan Jameson (USA)
Try [desc] -Original Message- From: Ryan Jameson (USA) Sent: Wednesday, July 10, 2002 10:51 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Mysql syntax error - phpMyAdmin ?? desc is a key word. :-\ -Original Message- From: Michael Zornek [mailto:[EMAIL PROTECTED]] Sent:

Re: [PHP-DB] Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread Chip Atkinson
I can't say for sure, but perhaps desc is a reserved word, short for describe. What happens if you say something like description? Chip On Wed, 10 Jul 2002, Michael Zornek wrote: I was using phpMyAdmin to do an export from one machine to another and on import I got an error: Error

Re: [PHP-DB] Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread Martin Clifford
DESC is a reserved word in SQL, standing for Descending Order. That is why you can't use it as a table column name. HTH Martin Michael Zornek [EMAIL PROTECTED] 07/10/02 12:49PM I was using phpMyAdmin to do an export from one machine to another and on import I got an error: Error

RE: [PHP-DB] Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread Ryan Jameson (USA)
Sorry, [desc] won't work either. :-( -Original Message- From: Chip Atkinson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 10:54 AM To: Michael Zornek Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Mysql syntax error - phpMyAdmin ?? I can't say for sure, but perhaps desc is

Re: [PHP-DB] Calculating inside query?

2002-07-10 Thread andy
oh I see! There have been '' values in some columns. Thanx Andy Ryan Jameson [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... do both of the fields contain values and are they both numeric? It sure seems strange to me. I actually created a test and it

Re: [PHP-DB] Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread Jason Wong
On Thursday 11 July 2002 01:00, Ryan Jameson (USA) wrote: Sorry, [desc] won't work either. :-( Try `desc`. But it's best not to use 'desc' at all, it will save you confusion in the long run. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators *

[PHP-DB] How to get data from mysql to .csv?

2002-07-10 Thread matthew de Jongh
hello. we are still having no luck figuring out how to do this. we downloaded the code for the calendar off of www.php.net and everything works great except we can't get the newly approved items to go from mysql into the backend.csv we would be very appreciative if someone could help

Re: [PHP-DB] Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread Michael Zornek
Twas 7/10/02 12:55 PM, when Martin Clifford [EMAIL PROTECTED] said: DESC is a reserved word in SQL, standing for Descending Order. That is why you can't use it as a table column name. Ok, that makes sence - thanks! Although I find it a bit curious that building the DB in phpMyAdmin let me

Re: [PHP-DB] Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread Gurhan Ozen
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:

[PHP-DB] bouncing an idea...

2002-07-10 Thread Kirk Babb
I'm a grad student with a university medical research lab, and they have thousands of samples coming through. They want to integrate a web-based tracking system using barcodes and scanners to trace the samples through the different processing points in the lab. And they don't want to pay for a

[PHP-DB] Re: bouncing an idea...

2002-07-10 Thread Kirk Babb
My apologies for these posts, I'm just not sure where to start I'm asking for info more from the standpoint of finding someone who is using php mysql to accept the info from a scanner rather than wanting info about scanners. Thanks! Kirk -- PHP Database Mailing List

[PHP-DB] Re: bouncing an idea...

2002-07-10 Thread Martin Clifford
I would think the better way to set the entire system up is to have the barcodes scanned directly into a database (your choice), then just have PHP read the database and display editing, deleting, etc. I don't see any reason why the barcode has to go through PHP at all to make this a viable

[PHP-DB] PHP Security and Code Design

2002-07-10 Thread Hutchins, Richard
OK, so I was really bored today and started reading through some PHP security stuff starting with the php.ini-recommended and found the register globals off stuff. So you don't have to find it yourself, here's a direct lift from the file: ; This is the recommended, PHP 4-style version of the

Re: [PHP-DB] PHP Security and Code Design

2002-07-10 Thread Adam Alkins
I understand that this applies to data put into a form to be submitted to a database (or another page, I guess), but does it also apply to variable/value pairs passed along the URL from a hyperlink (a href=foo/bar.php?thisVar=thisValClick here./a)? I couldn't quite get it from the

[PHP-DB] odbc and primary key

2002-07-10 Thread j.a.z.
How can i get the information if a field on a database (in my case Access2000) is primary key via a php-odbc-function? or does i have to use sql for that? thanx j.a.z. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] PHP Security and Code Design

2002-07-10 Thread Hutchins, Richard
Thanks, Adam. All clear now. Rich -Original Message- From: Adam Alkins [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 4:28 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] PHP Security and Code Design I understand that this applies to data put into a form to be submitted to

[PHP-DB] Re: how do i establish odbc connection?

2002-07-10 Thread j.a.z.
hey gabor you have to define a DNS on your system. i assume that you know what DNS is and how to create on windows. if not, say it! afterwards check, if the odbc has been activated in your php.ini on windows-directory! the rest is easy: the code looks like that: if(

[PHP-DB] sort problem

2002-07-10 Thread andy
Hi guys, I have a problem sorting values comming out of a db. It is not as easy. Here is the prob: One table containing user points. Other table containing reports with rankings For each top 10 report (the 10 reports with the most ranking) there are 20 extra points granted Now I would like to

RE: [PHP-DB] Select string.

2002-07-10 Thread Shrock, Court
$login = mysql_query(SELECT * FROM Users WHERE Username ='$User_Name'); -Original Message- From: Shiloh Madsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 4:48 PM To: php-db Subject: [PHP-DB] Select string. Yet another thing i need some quick help with. What is

RE: [PHP-DB] A Simple Question

2002-07-10 Thread Beau Lebens
Ahhh - good correction Adam, I forgot about that method :) So I suppose if you already have an array and wanted to pass it in a link/URL then you could do something like foreach($array as $value) { $qstring .= 'array[]=' . $value . ''; } echo 'a href=link.php?' . $qstring . 'link/a';

[PHP-DB] Re: Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I was using phpMyAdmin to do an export from one machine to another and on import I got an error: Error =20 SQL-query=A0:=A0=20 =20 CREATE TABLE hospital ( id smallint(5) unsigned NOT NULL auto_increment, heath_system_id

[PHP-DB] RH7.3+Oracle9i(9.2.0)Client+PHP4.2.1+Apache1.3.26

2002-07-10 Thread Gordon Yeung
I'm just upgrading Linux Server to RH7.3 and installed Oracle9i(9.2.0) Client+PHP4.2.1+Apache1.3.26 Everything goes smoothly. However, when I access the Oracle server by means of PHP, it gives the following error: Warning: OCIStmtExecute: ORA-00909: invalid number of arguments The line that