Re: [PHP-DB] Big speed problem with MySQL

2002-02-18 Thread Arthur CARANTA
Ok I found what was the main source of slowlyness in my application : awful coding I made, which make several thousands of useless big queries !!! So I am optimizing my system. Nevertheless, I am new to DB cogin, so could you tell me more on Indexes ? What do they do ? Do they really incease

Re: [PHP-DB] finding ID's

2002-02-18 Thread DL Neil
Ok Jonathan, [I've put the answer back on the list - there are others who can help, and may well get back to you faster than I] Ok I get the auto_increment stuff... Just one more question. Let's say I want to show 25 rows per page. I want the script to generate links to the next page, and so

[PHP-DB] I cant get the logic for this...

2002-02-18 Thread Dave Carrera
Hi all, I want to display return results from my query (which works fine) In I tidy way on screen. So my result returns say seven results, I have a table, and I want to show 3 results per row of the table... I.e.: Table TR TD = result1 /TD TD result2 /TD TD = result3 /TD /TD /TR TR TD =

Re: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread David Sullivan
Hey, I didn't have to do any special configuring. All I did was setup the root password, login via the mysql console client and create my databases, then use mysql_connect() and mysql_select_db() like you said. What have you done other than just installing it? -- - Dave On February 18, 2002

Re: [PHP-DB] Session confusion :-(

2002-02-18 Thread Adam Royle
I presume that the session is not updating because PHP does not automatically overwrite session variables. You should use something like this: $category = $HTTP_GET_VARS[category]; session_register(category); Session register can be called more than once, and has no effect on current session

[PHP-DB] R: [PHP-DB] I cant get the logic for this...

2002-02-18 Thread Riccardi Moreno
You could use this script: ?php $columns = 3; $count = 0; while ($query_data = $yoursearch){ $count++; if ($count $columns) { echo td$query_data[]/td; } else if ($count == $columns) { $count = 0; echo trtd$query_data[]/td; } for ($i=$count;$i=$columns;$i++){ echo

Re: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread Greg Donald
I've been working with PHP/MySQL on Win NT and Win 2000 for a few weeks. I've now set up a Linux machine (Mandrake 8.1 on Dell laptop) and have moved my files across. I use an include file which logs on to the MySQL server and then connects to the database. It performs the login ok but not

Re: [PHP-DB] I cant get the logic for this...

2002-02-18 Thread Greg Donald
I want to display return results from my query (which works fine) In I tidy way on screen. So my result returns say seven results, I have a table, and I want to show 3 results per row of the table... I.e.: Table TR TD = result1 /TD TD result2 /TD TD = result3 /TD /TD /TR TR TD =

Re: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread George Pitcher
Greg, et al, This is the contents of the include file: ?php $link = mysql_connect ('localhost', 'root', '*') or die (Could not select db); mysql_select_db ('Heronsql') or die (Could not connect); ? I have also tried it with the following: ?php $link = mysql_connect ('localhost',

RE: [PHP-DB] I cant get the logic for this...

2002-02-18 Thread Cami
Hi Dave, I wrote the following script which does exaclty that. Cami ? mysql_connect ($hname, $usrname, $password) OR DIE (unable to connect); $selectstmnt = your sql statement; $result = mysql_db_query ($dbname, $selectstmnt); $numrows = mysql_num_rows($result); $i=3; echo table

[PHP-DB] R: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread Michele Azzolari
Hi to all I'm a new one To connect to mysql server I use ?php $dbhost = localhost; $dbuname = dbuser; $dbpass = dbpassw; $dbname = dbname; $conn = mysql_connect($dbhost, $dbuname, $dbpass) or die(Errore!); $my_db = mysql_select_db($dbname) or die(Errore!); ? Miki -- PHP

RE: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread Rick Emery
Have you spelled the name of the database correctly, including case sensitivity? What error message are you getting to indicate failure? -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 8:21 AM To: Greg Donald; [EMAIL PROTECTED] Subject:

Re: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread George Pitcher
Rick, I snipped the code from my windoze system. I did have to change the case of the dbname to reflect the Linux version (all lc). The error message I got (not displayed on screen but visible on 'view source') was 'Could not connect' which, to me means that it got past the login to server and

[PHP-DB] RE: I cant get the logic for this...

2002-02-18 Thread Dave Carrera
Firstly thanks to everyone who have supplied various way to implement the issue I was having. Unfortunately I cant seem to get any one of them to function correctly I have included my code to see if someone can help adjusting it. I think I am going wrong in where I am putting the count var.

RE: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread Rick Emery
Do you have your error messages crossed? I ask, because I would think your cannot select message would go with your mysql_select_db() and your cannot connect would go with your mysql_connect() -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18,

Re: [PHP-DB] Session confusion :-(

2002-02-18 Thread Yasuo Ohgaki
Read current manual page. If you still have problem, let me know what's the problem. http://www.php.net/manual/en/ref.session.php -- Yasuo Ohgaki -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread George Pitcher
Greg, et al, Now the re-installation is complete, I am getting past the original error -- only to hit another. My query is as follows (echoed to web page): SELECT DISTINCT Nickname, HEI_ID FROM customers WHERE Nickname '' ORDER BY Nickname I have checked case against db an it is correct. Am

RE: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread Rick Emery
what is the error message you get? do you print otu mysql_error() ? -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 9:42 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Problem connecting to db on Linux Greg, et al, Now the

[PHP-DB] R: [PHP-DB] RE: I cant get the logic for this...

2002-02-18 Thread Riccardi Moreno
try to change with this: if(ISSET($category)){ $columns = 3; $count = 0; $viewsql = select * from $tbn2 where catid = \$category\ ; $viewres = @mysql_query($viewsql, $con) or die (Cant get details. Please report this to the website administrator); $num_rows = mysql_num_rows($viewres);

Re: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread George Pitcher
Rick, Sorry, here it is: Warning: Supplied argument is not a valid MySQL result resource in /var/www/html/HERONweb/home.php on line 32 I have 'echo mysql_errno();' just after the query is called but no number is being displayed. George - Original Message - From: Rick Emery [EMAIL

RE: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread Rick Emery
so, you probably have something like, right? If not, change your code to: $query = SELECT DISTINCT Nickname, HEI_ID FROM customers WHERE Nickname ORDER BY Nickname; $result = mysql_query($query) or die(error: .mysql_error()); show us your code. I ask, because you appear to have an extra in

[PHP-DB] cron job

2002-02-18 Thread Jennifer Downey
Ok I have the cron job figured out. The only thing I would like help with is how to update all users in a table. This just updates a spacific user: $db[points]=(UPDATE wt_users set points = points + 1000 WHERE uid={$session[uid]}); $result=mysql_query($db[points]); How would I use this to

Re: [PHP-DB] cron job

2002-02-18 Thread Joshua Hoover
Hi Jen, Remove the WHERE clause (in your code: WHERE uid={$session[uid]}) in your query and that will update all rows in the table. Hope that helps, Joshua Hoover Ok I have the cron job figured out. The only thing I would like help with is how to update all users in a table. This just

[PHP-DB] Dynamic Table Columns

2002-02-18 Thread Rankin, Randy
I have a form (criteria.php) that includes two drop down lists from which a user can select a start period and an end period from a MySQL table. This form posts to a form called order_summary.php on which I am using the $start_period and $end_period variables from the criteria.php form to pull

Re: [PHP-DB] Semi-newbie - postgres polygon/points and PHP?

2002-02-18 Thread Andrés Felipe Hernández
sorry the late reply, could you consider having each set of coordinates in 2 different fields? select r.x, r.y from room r andrés - Original Message - From: Roger Southwick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 16, 2002 12:18 AM Subject: [PHP-DB] Semi-newbie

Re: [PHP-DB] Dynamic Table Columns

2002-02-18 Thread DL Neil
Randy, Suggest pulling the data out of the resultset using a numberically-indexed array. Then o/p each TD.../TD inside a loop - you know how many times to loop, because that is set by the number of rows (plus Total column). BTW if you use aliases on those SUM() columns - it will make life a

[PHP-DB] sql query

2002-02-18 Thread CrossWalkCentral
I am having a minor problem doing a simple sql query. Error performing service query : You have an error in your SQL syntax near '' at line 1 Here is a snip of the code: Please let me know what you think. if ($submit): $status=0; // REQUEST INFO FOR SERVICES $results = mysql_query( SELECT *

RE: [PHP-DB] sql query

2002-02-18 Thread Beau Lebens
try replacing WHERE display=$custcatergory); with WHERE display='$custcatergory'); and also tru echoing the value of that SQL statement (assign it to a var first) to make sure you are getting the right thing. HTH /b // -Original Message- // From: CrossWalkCentral [mailto:[EMAIL

Re: [PHP-DB] sql query

2002-02-18 Thread CrossWalkCentral
Thanks I will try that. Beau Lebens [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... try replacing WHERE display=$custcatergory); with WHERE display='$custcatergory'); and also tru echoing the value of that SQL statement (assign it to a var first) to make

[PHP-DB] Sample Warehouse Management System Codes?

2002-02-18 Thread Alvin Ang
Hi ppl, Sorry to bother you ppl again, I was just wondering would anybody happen to have simple codes for a Warehouse Management System? I need it as a reference to do my Final Year Project for my University. Thanks! Alvin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] Sample Warehouse Management System Codes?

2002-02-18 Thread Bogdan Stancescu
I'm constantly amazed how people can post such e-mails without first checking freshmeat - it really takes longer to write the e-mail, you know? This is what I came up with - out of sheer curiosity - in less than a minute, by clicking on freshmeat, typing warehouse and clicking on the project

RE: [PHP-DB] Sample Warehouse Management System Codes?

2002-02-18 Thread Alvin Ang
Thanks a million!! I din know abt freshmeat.net, very new to programming, infact it's the first time that i am doing a program. Alvin P.S: But more references would very much be appreciated!! :P -Original Message- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

[PHP-DB] How to make logout from database server (ORACLE for example) when user closes its session

2002-02-18 Thread Vlad A. Chernikhoff
Hi all Is it possible to track such situations when http user closes connection to HTTP server to close opened persistent connections to the database? This connections is still active all the time (if using php not as CGI but as module for Apache) and when user trying to login next time PHP uses