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
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
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 =
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
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
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
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
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 =
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',
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
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
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:
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
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.
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,
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
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
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
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);
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
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
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
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
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
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
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
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 *
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
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
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,
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
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,
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
33 matches
Mail list logo