[PHP-DB] Re: [PHP] mysql error

2011-05-05 Thread Daniel Brown
On Thu, May 5, 2011 at 10:29, Grega Leskovšek  wrote:
> Can smbd please look  at this sentence - I got an error and do not
> know how to fix it - I am still very unfamiliar with MYSQL:
>
> CREATE TABLE log (  idlog int auto_increment not null,  imepriimek
> varchar(50),  clock timestamp,  action varchar(30),  onfile
> varchar(100), filesize float(6,2), uniqueid(idlog) );
>
> ERROR 1064 (42000): You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right
> syntax to use near '(idlog) )' at line 1

This is by no means a PHP question, and should not be asked on the
PHP General mailing list.  Please ask questions in the appropriate
place; for this, the MySQL General list is the correct forum, and
they've been CC'd.  In the future, if it relates to a PHP database
issue, you may want to use the PHP Database mailing list, also CC'd.
This not only means you'll get more on-target help faster, but also
helps in archiving data in the proper location for future searchers.

-- 

Network Infrastructure Manager
http://www.php.net/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PHP- Mysql problem

2009-09-01 Thread Ahmet Caner
Mysql Username or password error.please testing connect setting
--
"NADARAJAH SIVASUTHAN NADARAJAH" , haber iletisinde 
sunlari yazdi:col106-w49cf8a0029c9582f1c0161d5...@phx.gbl...



Dear all,

When I try to retrive data from two tables using JOIN OR INNER JOIN 
it display error message

given below;



Warning: mysql_query() [function.mysql-query]: Access denied for user 
'ODBC'@'localhost' (using password: NO) in 
C:\wamp\www\ap_v5\inc\profile.inc.php on line 285

Warning: mysql_query() [function.mysql-query]: A link to the server could 
not be established in C:\wamp\www\ap_v5\inc\profile.inc.php on line 285

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result 
resource in C:\wamp\www\ap_v5\inc\profile.inc.php on line 288





what may be the reason?



Normally PHP-mysql works fine.

Can you figure it out and give me the possible solution?



Thank you.

suthan



_
Windows Live™: Keep your life in sync. Check it out!
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PHP-MySQL connection for particular module

2008-06-18 Thread Isaak Malik
You're very welcome, I understand that you need a solution which allows you
to keep using the connection this way.

I doubt that your php.ini is the cause so I'll suggest the following:

Try executing your MySQL queries by passing the $link variable to the
function as the connection resource:

mysql_query("SELECT...", $link);

Something that also might cause it is that you use (include|require)_once
and that this module doesn't have access to the connection resource, if this
is the case change it into include|require and see if that solves your
issue. If not then could you please post some example code of your module if
possible so we can be more helpful?

Also be sure that you global $link; it in functions (I don't know if this
required since I didn't use it this way for a long while).

Could you also please answer to the list instead of directly to me as this
might also be informative for others.

On Tue, Jun 17, 2008 at 10:49 PM, <[EMAIL PROTECTED]> wrote:

> Thank you Isaak for interest in my subject.
>
> I have my connection set in a separate file which is included into the
> page. All my modules work except this one.
> When I use the following line
> $link = mysql_pconnect('localhost', 'root', 'testing');
> actually, my module starts working which is a redundant line as long as I
> have all this set in my include file.
> The thing is that I would like to keep this code in an included file for
> clearness and readability and make it work.
>
> Any idea why this is happening only to this module. May be, it requires
> change of some settings in php.ini or I am doing something wrong but the
> code is actually working when I introduce the line above.
> Tanx
>
> Isaak Malik-3 wrote:
> >
> > If you get an error of this kind:
> >
> > "Warning: mysql_query() [function.mysql-query]: Access denied for user
> > 'ODBC'@'localhost' (using password: NO) in D:\Program Files\Apache
> > Software
> > Foundation\Apache2.2\htdocs\login.php on line 17
> >
> > Warning: mysql_query() [function.mysql-query]: A link to the server could
> > not be established in
> > D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\login.php on
> > line 17"
> >
> > It means that either your mysql conenction details are not correctly set
> > or
> > the connection resource isn't accessible for your mysql functions. I
> > suggest
> > you first try by replacing:
> >
> > $link = mysql_pconnect('localhost', 'root', 'testing');
> >
> > into:
> >
> > mysql_pconnect('localhost', 'root', 'testing');
> >
> > On 6/17/08, bateivan <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >> Hello,
> >>
> >> First of all, please, have in mind that I am new in this business.
> >>
> >> I have a problem connecting with data base in one particular module.
> >> That's
> >> right. The rest of the modules can connect to db, update tables with new
> >> info but this one is refusing giving me message like this:
> >>
> >> "Warning: mysql_query() [function.mysql-query]: Access denied for user
> >> 'ODBC'@'localhost' (using password: NO) in D:\Program Files\Apache
> >> Software
> >> Foundation\Apache2.2\htdocs\login.php on line 17
> >>
> >> Warning: mysql_query() [function.mysql-query]: A link to the server
> could
> >> not be established in
> >> D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\login.php
> on
> >> line 17"
> >>
> >>
> >> It is a authentication module and this is the fragment of the code which
> >> is
> >> giving me a hard time:
> >>
> >>
> >>
> ***
> >>  >> include $_SERVER['DOCUMENT_ROOT'].
> >> '/layout.php';
> >>
> >> switch($_REQUEST['req']){
> >>
> >> case "validate":
> >>
> >>$validate = mysql_query("SELECT * FROM members
> >>WHERE username = '{$_POST['username']}'
> >>AND password = md5('{$_POST['password']}')"
> >>);
> >>
> >> etc
> >>
> >>
> >>
> ***
> >>
> >> My platform is WinXP on drive F:\ (I have Win'98 on C:\) and as you can
> >> see
> >> my program files are on D:\. All this may not be important but I listed
> >> anyway.
> >> It is installed Apache 2.2.6 using windows installer, PHP 5.2.6 (I just
> >> replaced 5.2.5 hoping to fix the problem), and MySQL 5.0.45.
> >>
> >> I am using persisten connection which should be on until you restart the
> >> server. I have a file included in every page for connection with MySQL
> >> and
> >> data base.
> >> PHP manual says that "mysql_query" reuses the existing connection or try
> >> to
> >> create one if not present (I think, according to the warning is trying
> to
> >> create one).
> >> I had been checking after each step using phpinfo() if the connection is
> >> there and it's there but for some reason the above fragment does not
> >> work.
> >> As I mentioned above the rest of my modules are working fine with mysql.
> >>
> >> I checked the "ph

[PHP-DB] RE: [PHP] MySQL Identifying worst-performing codes

2007-10-04 Thread Jay Blanchard
[snip]
There is  a tool call "idera" (SQL diagnostic manager). Basically it is a 
performance monitoring and diagnostics tool. 
It has a feature;  

Identifying of worst-performing codes - 
Identifies performance bottlenecks such as the worst-performing stored 
procedures, long-running queries, most frequently run queries, SQL Statements 
and SQL batches
http://www.idera.com/Products/SQLdm/Features.aspx 

I'm looking for a same like tool for MySQL. Is anyone have any  ideas.
[/snip] 

Have you thought about asking this on the MySQL list?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: php mysql dates

2004-07-30 Thread J.T. Moore
You can use something like

$articleDate= date ("Y-m-d 00:00:00",strtotime($day ." " . $month . " " 
. $year));

If $day =  10 and $month = "January" and $year = 2004
then $articleDate will be set to "2004-01-10 00:00:00"

Then you can insert $articleDate into a datetime field in mysql.


"Irm Jr" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Hi all, currently I have a form which prompts for the user to choose a
date.  The dropdown lists are stored into variables:

$month//e.g. January, February, ...
$day   //e.g 1 - 31
$year  //e.g. 2004 (four digits)

then combined into

$articleDate

How can I manipulate this variable to be in such a format that I can
insert the information into a DATE column in a mySQL database.

Dates are a bit of a mystery to me as PHP and MySQL handle them
differently.  Your help is appreciated.

Thanks

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: php/mysql error

2004-07-27 Thread David Robley
On Wed, 28 Jul 2004 02:36, Redhat wrote:

> I am getting a weird error on one of my servers that says something
> about "query requires full tablescan".  I was not getting this error
> until today that I noticed.  I Googled for a minute and saw where a ton
> of other sites had the same problem but no "reason" why.  I did find one
> board that said to turn off "mysql.trace_mode" in the php.ini file.  I
> did this and it fixed the problem.  Is there something different that I
> should be doing when I write code?  Have I just "band aided" the problem
> or solved the problem?
> thanks,
> Doug

You are possibly using a query without indexes. Try running EXPLAIN on your
query, and have a look at this page from the mysql site which tells more
about table scans.

http://dev.mysql.com/doc/mysql/en/How_to_avoid_table_scan.html

Cheers
-- 
David Robley

Help! I'm lost somewhere in the Generation Gap.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PHP/MySQL learning project

2004-06-11 Thread news.php.net
So given the same database diagram ("MovieMain", "Actors", "Genre", then a
table named "MovieActor" to allow multiple actors to be associated with a
movie, and "MovieGenre" to allow multiple genre's to be associated with a
movie), can you steer me in the right direction on writnig the PHP to
display all movies (one by one) with all of the actors and genre's
associated with each movie (yet only display the movie title once)?



"News.Php.Net"
> Hi everyone!
>
> In trying to learn PHP and MySQL, I'm trying to create a web-based
database
> application that will keep track of my movies.  I have five tables (shown
in
> the graphic).  I'm trying to be able to display the results of the tables
> with one movie title, all of the actors associated with it, and all of the
> genre's associated with it.
>
> Of course I can do the query:
>   Select *
>   From MovieMain, MovieActor, MovieGenre, Genre, Actors
>   Where MovieMain.MovieID=MovieGenre.MovieID
>   And MovieMain.MovieID=MovieActor.MovieID
>   And MovieActor.ActorID=Actors.ActorID
>   And MovieGenre.GenreID=Genre.GenreID
>
> But that displays the movie title for every genre and actor there is.  Is
> there another way to perform the query that will display the title once,
and
> all of the associated genres and all of the associated actors for that
> movie?  Or should I try to code it using PHP to find the movie title
first?
>
> Thanks in advance, everyone!
>
>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PHP/MySQL learning project

2004-06-11 Thread Justin Patrin
Alexey Kupershtokh wrote:
Hi.

In trying to learn PHP and MySQL, I'm trying to create a web-based
database
application that will keep track of my movies.  I have five tables (shown
in
the graphic).  I'm trying to be able to display the results of the tables
with one movie title, all of the actors associated with it, and all of the
genre's associated with it.

You are thinking not in the terms of relational db. It's impossible on the
mysql db level.
WBR, Wicked
I don't know what you're trying to say here. You can do relational 
databases with mysql without any trouble whatsoever. Just because it 
doesn't support foreign keys (constraints) doesn't mean you can't have 
foreign keys. In fact, foreign keys mostly just slow down the run-time 
of your system, but I don't want to start a holy war here.

--
paperCrane 
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: PHP/MySQL learning project

2004-06-11 Thread Alexey Kupershtokh
Hi.

> In trying to learn PHP and MySQL, I'm trying to create a web-based
database
> application that will keep track of my movies.  I have five tables (shown
in
> the graphic).  I'm trying to be able to display the results of the tables
> with one movie title, all of the actors associated with it, and all of the
> genre's associated with it.

You are thinking not in the terms of relational db. It's impossible on the
mysql db level.

WBR, Wicked

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PHP/MySQL learning project

2004-06-10 Thread news.php.net
Excellent!  That's exactly what I needed to know!  Thanks a million!


"Justin Patrin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> News.Php.Net wrote:
> > Hi everyone!
> >
> > In trying to learn PHP and MySQL, I'm trying to create a web-based
database
> > application that will keep track of my movies.  I have five tables
(shown in
> > the graphic).  I'm trying to be able to display the results of the
tables
> > with one movie title, all of the actors associated with it, and all of
the
> > genre's associated with it.
> >
> > Of course I can do the query:
> >   Select *
> >   From MovieMain, MovieActor, MovieGenre, Genre, Actors
> >   Where MovieMain.MovieID=MovieGenre.MovieID
> >   And MovieMain.MovieID=MovieActor.MovieID
> >   And MovieActor.ActorID=Actors.ActorID
> >   And MovieGenre.GenreID=Genre.GenreID
> >
> > But that displays the movie title for every genre and actor there is.
Is
> > there another way to perform the query that will display the title once,
and
> > all of the associated genres and all of the associated actors for that
> > movie?  Or should I try to code it using PHP to find the movie title
first?
> >
> > Thanks in advance, everyone!
> >
> >
> >
>
> There's no way to do that in SQL alone. You should do it in PHP. :-)
>
> -- 
> paperCrane 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PHP/MySQL learning project

2004-06-10 Thread Justin Patrin
News.Php.Net wrote:
Hi everyone!
In trying to learn PHP and MySQL, I'm trying to create a web-based database
application that will keep track of my movies.  I have five tables (shown in
the graphic).  I'm trying to be able to display the results of the tables
with one movie title, all of the actors associated with it, and all of the
genre's associated with it.
Of course I can do the query:
  Select *
  From MovieMain, MovieActor, MovieGenre, Genre, Actors
  Where MovieMain.MovieID=MovieGenre.MovieID
  And MovieMain.MovieID=MovieActor.MovieID
  And MovieActor.ActorID=Actors.ActorID
  And MovieGenre.GenreID=Genre.GenreID
But that displays the movie title for every genre and actor there is.  Is
there another way to perform the query that will display the title once, and
all of the associated genres and all of the associated actors for that
movie?  Or should I try to code it using PHP to find the movie title first?
Thanks in advance, everyone!

There's no way to do that in SQL alone. You should do it in PHP. :-)
--
paperCrane 
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Re: php/mysql weblog - addnews function problems

2004-02-18 Thread Slippyaah
I've tried playing around with it a bit but I'm getting quite confused now.
It still doesn't like my declaration of variables and I'm not sure how to
declare 'id' either as it isn't used in the form as a field of entry - just
an index in the database.

Any help would greatly be appreciated cause I'm using this as an inclusion
in a piece of coursework I'm doing and the deadline is looming! :/

thanks

slippy


"Doug Thompson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, 18 Feb 2004 09:35:22 -, Slippyaah wrote:
>
> >Well basically I think it's a problem with the declaration of variables
> >and/or the way they are being processed by the form.
> >
> >Here is the individual addNews function:
> >
> >function addNews() {
> >   global $db;
> >
> >   /* declare variables here? */
> >
> >
> >
> >   /* insert the new news entry */
> >   $query = "INSERT INTO news" .
> >  "VALUES('',$id,'{$_POST['postdate']}'," .
> >  "'{$_POST['title']}',".
> >  "'{$_POST['newstext']}')";
>
> I haven't been following this thread, but you need to do your part to help
the parser.
>
> $query = "INSERT INTO news ";
> $query .= "VALUES('',$id,'".$_POST['postdate']."',";
> $query .= "'".$_POST['title']."',";
> $query .= "'".$_POST['newstext']."')";
>
> You should also add some db error checking and reporting, then you
wouldn't get the erroneous "success" message.
>
> hth,
> Doug

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Re: php/mysql weblog - addnews function problems

2004-02-18 Thread Doug Thompson
On Wed, 18 Feb 2004 09:35:22 -, Slippyaah wrote:

>Well basically I think it's a problem with the declaration of variables
>and/or the way they are being processed by the form.
>
>Here is the individual addNews function:
>
>function addNews() {
>   global $db;
>
>   /* declare variables here? */
>
>
>
>   /* insert the new news entry */
>   $query = "INSERT INTO news" .
>  "VALUES('',$id,'{$_POST['postdate']}'," .
>  "'{$_POST['title']}',".
>  "'{$_POST['newstext']}')";

I haven't been following this thread, but you need to do your part to help the parser.

$query = "INSERT INTO news ";
$query .= "VALUES('',$id,'".$_POST['postdate']."',";
$query .= "'".$_POST['title']."',";
$query .= "'".$_POST['newstext']."')";

You should also add some db error checking and reporting, then you wouldn't get the 
erroneous "success" message.

hth,
Doug

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: php/mysql weblog - addnews function problems

2004-02-18 Thread Slippyaah
Hey David,

Well basically I think it's a problem with the declaration of variables
and/or the way they are being processed by the form.

Here is the individual addNews function:

function addNews() {
   global $db;

   /* declare variables here? */



   /* insert the new news entry */
   $query = "INSERT INTO news" .
  "VALUES('',$id,'{$_POST['postdate']}'," .
  "'{$_POST['title']}',".
  "'{$_POST['newstext']}')";

   /* if statement to process the input? */



   mysql_query($query);

   echo "New News Entry Added!\n";
   echo "Back to Blog";


   /* adds a form where the administrator to add news */

   echo "";
   echo "";

   echo "Make a new
entry: ";

   echo "";
   echo "Title: ";
   echo "";
   echo "News: ";
   echo "";
   echo "";
   echo "";
   echo "";
   echo "";
   echo "";

  }

and here is the error it produces so far (obviously I know that as it is it
wont work but my problem is that I don't know exactly what to do to it go
get it to work...:P)

Notice: Undefined variable: id in
c:\inetpub\wwwroot\webdev\phpblog\site\PHPblog.php on line 266

Notice: Undefined index: postdate in
c:\inetpub\wwwroot\webdev\phpblog\site\PHPblog.php on line 266

Notice: Undefined index: title in
c:\inetpub\wwwroot\webdev\phpblog\site\PHPblog.php on line 267

Notice: Undefined index: newstext in
c:\inetpub\wwwroot\webdev\phpblog\site\PHPblog.php on line 268
New News Entry Added!
Back to Blog

Slippy


"David Robley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] says...
> > hey,
> >
> > I've been working on a PHP/MYSQL weblog and I've got most of it working
> > apart from the adding new news function and a login section.   I've set
the
> > form up but it is coming up with a few errors and the actual submitting
of
> > data doesn't work as of yet.  The code is too long to include in this
post
> > and its hard to explain exactly where it is going wrong because I'm
fairly
> > new to PHP and MYSQL - this is my first stab at them both.
> >
> > Just wandering if anyone could take a couple of minutes to look at my
php
> > code and tell me what is wrong with it? (it's probably something
blindingly
> > obvious;))
> >
> > thanks very much
> >
> > slippy
> >
>
> Perhaps if you were to post the errors returned and the few lines of code
> leading up to the line where the error occurs...
>
>
> -- 
> Quod subigo farinam
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on usenet?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: php/mysql weblog - addnews function problems

2004-02-17 Thread David Robley
In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> hey,
> 
> I've been working on a PHP/MYSQL weblog and I've got most of it working
> apart from the adding new news function and a login section.   I've set the
> form up but it is coming up with a few errors and the actual submitting of
> data doesn't work as of yet.  The code is too long to include in this post
> and its hard to explain exactly where it is going wrong because I'm fairly
> new to PHP and MYSQL - this is my first stab at them both.
> 
> Just wandering if anyone could take a couple of minutes to look at my php
> code and tell me what is wrong with it? (it's probably something blindingly
> obvious;))
> 
> thanks very much
> 
> slippy
> 

Perhaps if you were to post the errors returned and the few lines of code 
leading up to the line where the error occurs...


-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PHP/MySQL Help

2003-10-19 Thread conbud
Hey, Also the webhost only allows us a direct database connection
using phpMyadmin, I did notice that on the table that stores the info, it
keep getting an error after someone is posting the form. The error says
something about Overhead: 275 bytes, Is this just an MySQL limitation that
is set by the webhost ? and this overhead you think that would keep the info
from being entered into the database. To get the error to go away I have to
optimize the table.

ConbuD

"Conbud" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> From: "Conbud" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: PHP/MySQL/Server not working
> Date: Friday, October 17, 2003 6:17 PM
>
> Hey, just a quick question, I have a form that users can fill out to join
a
> certain group, we can then view that info from an admin page that requires
> logging in. When a user fills out the form I get an email letting me know
> that the form was submitted with the users info as well. Here recently,
I've
> been getting that info but their info isn't being saved into the database
> for somereason, anyone have any idea why ? I have filled out the form at
> least 15-25 times using different info and everyone of them worked for me.
I
> even filled out the form using different special characters and still with
> no problems, I am using stripslashes on the form data, but I don't think
> that could keep the info from being saved to the database, it only does
this
> periodically. Could this be due to a slow server ? or is there some sort
of
> special character that could conflict with my PHP or with the MySQL syntax
?
> I just have no clue now. Any thoughts are appreciated.
>
> Thanks
> ConbuD

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PHP, MySQL and Apache 2 ?

2003-09-02 Thread Shadow
I have it running under Windows NT 4.0..no problems...

Shadow

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Re PHP, MySql

2003-06-22 Thread Becoming Digital
Check out the below:
http://us4.php.net/manual/en/features.persistent-connections.php
http://us4.php.net/manual/en/function.mysql-pconnect.php

Edward Dudlik
Becoming Digital
www.becomingdigital.com


- Original Message - 
From: "Peter Goggin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, 22 June, 2003 10:13
Subject: [PHP-DB] Re PHP, MySql


I have a web site interfacing to a mysql databases which eventually may have
a large number of users. Should I use persistent coneconnection mode or let
each screen make and drop a connection ?
Where will I find guide lines on this?


Is this the correct list for this question?

Regards


Peter Goggin


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re PHP, MySql

2003-06-22 Thread Peter Goggin
I have a web site interfacing to a mysql databases which eventually may have
a large number of users. Should I use persistent coneconnection mode or let
each screen make and drop a connection ?
Where will I find guide lines on this?


Is this the correct list for this question?

Regards


Peter Goggin


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: php/mysql query

2003-02-21 Thread Fredrik de Vibe
[EMAIL PROTECTED] (Julie Keywell) writes:
> I am querying our database for 11,000 different zip codes and it seems
> to be overloading MySQL.  However, common sense says it shouldn't.
> 
> My question is:
> When needing to query 11,000 things, is it best to make 1 SQL statement
> that has 11,000 ors, or run through individual querys 11,000 times?  Any
> help would be wonderful!  I am making PHP do the counting rather than
> MySQL.

I'm thinking join somehow, but I'm not sure I completely understand
the question. Post the query and table structure (you should change
the table names first, I guess, and only the necessary tables), and
maybe I for one can say more. :-)


-- 
--Fredrik
... and furthermore ... I don't like your trousers.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Re: PHP/MySQL not available remotely...

2002-12-04 Thread dufronte

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, December 04, 2002 11:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: PHP/MySQL not available remotely...

On Thursday 05 December 2002 00:44, Chase wrote:
> Yes I am.
>
> I was just asked to create a simple web page that would display the
> visitors IP address using:
>
> 

>So you're saying that the above works ...

> and when I call this up over the intranet or internet it works just
fine.
> However, I was also asked to create a page that would just display the
PHP
> Info screen and that will only show up on the server..  I can't get
that
> page to show remotely.

>... but  doesn't work??

Oh my GOD.. this is a really big problem... why don't you try using
APACHE web server... in my experience... IIS alwas delivered so many
errors with PHP.




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: PHP/MySQL not available remotely...

2002-12-04 Thread Chase
The phpinfo() call works great on the server itself, but I cannot get the
information to display to anyone that connects to the server.


"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thursday 05 December 2002 00:44, Chase wrote:
> > Yes I am.
> >
> > I was just asked to create a simple web page that would display the
> > visitors IP address using:
> >
> > 
>
> So you're saying that the above works ...
>
> > and when I call this up over the intranet or internet it works just
fine.
> > However, I was also asked to create a page that would just display the
PHP
> > Info screen and that will only show up on the server..  I can't get that
> > page to show remotely.
>
> ... but  doesn't work??
>
> > Based on this, I think my error is in my setups for either PHP4 or
IIS...
>
> If phpinfo() doesn't work then I think you've got far bigger problems than
> setups to worry about ;-)
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
>
> /*
> I knew one thing: as soon as anyone said you didn't need a gun, you'd
better
> take one along that worked.
> -- Raymond Chandler
> */
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: PHP/MySQL not available remotely...

2002-12-04 Thread Jason Wong
On Thursday 05 December 2002 00:44, Chase wrote:
> Yes I am.
>
> I was just asked to create a simple web page that would display the
> visitors IP address using:
>
> 

So you're saying that the above works ...

> and when I call this up over the intranet or internet it works just fine.
> However, I was also asked to create a page that would just display the PHP
> Info screen and that will only show up on the server..  I can't get that
> page to show remotely.

... but  doesn't work??

> Based on this, I think my error is in my setups for either PHP4 or IIS...

If phpinfo() doesn't work then I think you've got far bigger problems than 
setups to worry about ;-)

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
I knew one thing: as soon as anyone said you didn't need a gun, you'd better
take one along that worked.
-- Raymond Chandler
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: PHP/MySQL not available remotely...

2002-12-04 Thread Chase
Yes I am.

I was just asked to create a simple web page that would display the visitors
IP address using:



and when I call this up over the intranet or internet it works just fine.
However, I was also asked to create a page that would just display the PHP
Info screen and that will only show up on the server..  I can't get that
page to show remotely.

Based on this, I think my error is in my setups for either PHP4 or IIS...


"David Smith" <[EMAIL PROTECTED]> wrote in message
1039019556.7619.3.camel@hemlock">news:1039019556.7619.3.camel@hemlock...
> Are you able to connect to the MySQL server from the command line using
> a non-php client?
>
> --Dave
>
> On Wed, 2002-12-04 at 09:04, [EMAIL PROTECTED] wrote:
> >
> > do you have the persmissions set either for
[EMAIL PROTECTED](which
> > would only work from remotehost.com) or username@'%' (which would work
for
> > that username from any host)
> >
> >
> > hth
> > jeff
> >
> >
> >
> > "Chase"
> >  > biz> cc:
> >  Subject: [PHP-DB] Re:
PHP/MySQL not available remotely...
> > 12/04/2002
> > 10:58 AM
> >
> >

> >
> >
> >
> >
> > Okay, it was suggested that I may not have my "register_globals" flagged
to
> > "on" but I do.  I still can't seem to make any remote connect to the
> > server.
> > Again, there are no errors, it just flat don't work.
> >
> > Chase
> >
> >
> > "Chase" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > I seem to have a bit of an issue with my PHP/MySQL settings...
> > >
> > > A basic PHP bit like  works great on my
> > > webserver.  However, with any form of DB access the page just hangs...
I
> > > don't get an error, but I don't get results either.  I also have
> > > phpMyAdmin-2.3.3 running.  I can access that from the server directly,
> > but
> > > if I try to get to it via any other machine I get NO results.
> > >
> > > I am running IIS 5 with PHP4 and MySQL v3.23.53-max.
> > >
> > > Suggestions?
> > >
> > >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: PHP/MySQL not available remotely...

2002-12-04 Thread David Smith
Are you able to connect to the MySQL server from the command line using
a non-php client?

--Dave

On Wed, 2002-12-04 at 09:04, [EMAIL PROTECTED] wrote:
> 
> do you have the persmissions set either for [EMAIL PROTECTED](which
> would only work from remotehost.com) or username@'%' (which would work for
> that username from any host)
> 
> 
> hth
> jeff
> 
> 
>  
>   
> "Chase"  
>   
>
> biz> cc: 
>                   
>  Subject: [PHP-DB] Re: PHP/MySQL not 
>available remotely...  
> 12/04/2002   
>   
> 10:58 AM 
>   
>  
>   
>  
>   
> 
> 
> 
> 
> Okay, it was suggested that I may not have my "register_globals" flagged to
> "on" but I do.  I still can't seem to make any remote connect to the
> server.
> Again, there are no errors, it just flat don't work.
> 
> Chase
> 
> 
> "Chase" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I seem to have a bit of an issue with my PHP/MySQL settings...
> >
> > A basic PHP bit like  works great on my
> > webserver.  However, with any form of DB access the page just hangs... I
> > don't get an error, but I don't get results either.  I also have
> > phpMyAdmin-2.3.3 running.  I can access that from the server directly,
> but
> > if I try to get to it via any other machine I get NO results.
> >
> > I am running IIS 5 with PHP4 and MySQL v3.23.53-max.
> >
> > Suggestions?
> >
> >
> 
> 
> 
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Re: PHP/MySQL not available remotely...

2002-12-04 Thread Jeffrey_N_Dyke

do you have the persmissions set either for [EMAIL PROTECTED](which
would only work from remotehost.com) or username@'%' (which would work for
that username from any host)


hth
jeff


   
 
"Chase"
 
 cc:   
 
         Subject:     [PHP-DB] Re: PHP/MySQL not 
available remotely...  
12/04/2002 
 
10:58 AM   
 
   
 
   
 




Okay, it was suggested that I may not have my "register_globals" flagged to
"on" but I do.  I still can't seem to make any remote connect to the
server.
Again, there are no errors, it just flat don't work.

Chase


"Chase" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I seem to have a bit of an issue with my PHP/MySQL settings...
>
> A basic PHP bit like  works great on my
> webserver.  However, with any form of DB access the page just hangs... I
> don't get an error, but I don't get results either.  I also have
> phpMyAdmin-2.3.3 running.  I can access that from the server directly,
but
> if I try to get to it via any other machine I get NO results.
>
> I am running IIS 5 with PHP4 and MySQL v3.23.53-max.
>
> Suggestions?
>
>



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: PHP/MySQL not available remotely...

2002-12-04 Thread Chase
Okay, it was suggested that I may not have my "register_globals" flagged to
"on" but I do.  I still can't seem to make any remote connect to the server.
Again, there are no errors, it just flat don't work.

Chase


"Chase" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I seem to have a bit of an issue with my PHP/MySQL settings...
>
> A basic PHP bit like  works great on my
> webserver.  However, with any form of DB access the page just hangs... I
> don't get an error, but I don't get results either.  I also have
> phpMyAdmin-2.3.3 running.  I can access that from the server directly, but
> if I try to get to it via any other machine I get NO results.
>
> I am running IIS 5 with PHP4 and MySQL v3.23.53-max.
>
> Suggestions?
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: PHP Mysql Select Distinct problem

2002-05-22 Thread Benjamin Walling

MessageAccording to http://www.mysql.com/doc/D/I/DISTINCT_optimisation.html,
DISTINCT is converted to a GROUP BY on all columns, DISTINCT combined with
ORDER BY will in many cases also need a temporary table.

Instead of using DISTINCT, consider adding GROUP BY for all the columns
except ID.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: PHP/MySql - address book

2002-01-06 Thread George Nicolae

look at http://www.webmasterbase.com/article/228

--


Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com



"Sg" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I'm trying to do a sort of address book where I'd put all information
about
> anybody or any company from which I receive informtation (friend, people
> from work, hotels, places...)
>
> An entry starts with a name, then I can have any type of information. The
> table I'm using has a lot of fields, but I display via PHP only those that
> are not empty.
>
> I'm now facing a problem many must have already faced. A lot of people
work
> for the same company, and I'd like to have a separate table or storage
area
> to put that data, so that I don't have to write the same company addresse
> twice, and if that information changes, I won't have to go through ten or
> twenty people's entries to modify it.
>
> So how would I link a company's information to a person's entry?
>
> I know it may sound easy or ridiculous a question, but though I know HTML
> very well I'm still a beginner (learning on my own) et PHP and MySql.
>
> So far I have a neat rendering of the database I've created, but I feel I
> should look further into DB use.
>
> Software I'm using:
>
> EasyPHP (latest version)
> PHP 4
> MySql
> PhpMyAdmin
>
> on Windows Me
>
> Main question, I repeat is : how would I link a company's information to a
> person's entry?
>
> Cheers
>
> Sébastien
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: php/mysql error

2001-11-21 Thread Fred

The error indicates that the result resource is invalid.  The result
resource in your example is $rs.  Either this is not the variable that you
used when sending the query or something went wrong with the query.  You
should always add "or die(mysql_error) to the end of your mysql_query
statements, as it will give you a detailed message about what failed.

Fred

Jon <[EMAIL PROTECTED]> wrote in message Usenet.ipsiitnr@localhost">news:Usenet.ipsiitnr@localhost...
> please review my script
>
> I have already had it said that the script is fine, please check.  IF
> it is then I have a set up proiblem which I would also like help to
> solve. BUT mysql outside of apache works fine.
>
> I started with an already set up apache so I don't know if mysql was
> installed in right, but the staements before the error seem to work so
> I would think so.
>
> I running my web server under red hat 7.0, I am new to apache/php and
> mysql.
>
> Thanks
>
> 
>
> I get an error when it hits the line
>
> while ($row = mysql_fetch_row($rs)) {}
>
> I know it won't do anything, just checking each command.
>
> For a moment I thought this means that the mysql wan't compiled in but -
> then how comes the other mysql_ statements don't error.
>
> anyway the error I get is this
> Supplied argument is not a valid MySQL result resource ...
>
> Now I am a C++ programmer so I am estimating here, it sounds like $row -
> is wrong, do I need to set this up as an array (I believe that is what -
> it is supposed to be)
>
> The $rs is right I am pretty sure and the command should do what I want-
> it to do.
>
>
>
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




SV: [PHP-DB] Re: php/mysql error

2001-11-20 Thread Trond Erling Hundal


I agree with mr. Torrent here...
you are not logged on to your mysql server when you issue the query!
Check your password/username...

> -Opprinnelig melding-
> Fra: torrentUK [mailto:[EMAIL PROTECTED]]
> Sendt: 20. november 2001 18:35
> Til: [EMAIL PROTECTED]
> Emne: [PHP-DB] Re: php/mysql error
>
>
> I think you can get this error when you sql query fails.
> Try copy and pasting the $sql query to the mysql command line and see what
> response you get (it looks as though this would work though unless you
> haven't got a table called "test").
> I guess it might be that you are not successfully logging on (although I
> can't recall whether that would then generate this error when you try and
> issue a query or not). You should set up a "die" error path as
> well to help
> you see if you fail to log in.
>
> -torrent
>
>
>
> "Jon" <[EMAIL PROTECTED]> wrote in message Usenet.ipsiitnr@localhost">news:Usenet.ipsiitnr@localhost...
> > please review my script
> >
> > I have already had it said that the script is fine, please check.  IF
> > it is then I have a set up proiblem which I would also like help to
> > solve. BUT mysql outside of apache works fine.
> >
> > I started with an already set up apache so I don't know if mysql was
> > installed in right, but the staements before the error seem to work so
> > I would think so.
> >
> > I running my web server under red hat 7.0, I am new to apache/php and
> > mysql.
> >
> > Thanks
> >
> > 
> >
> > I get an error when it hits the line
> >
> > while ($row = mysql_fetch_row($rs)) {}
> >
> > I know it won't do anything, just checking each command.
> >
> > For a moment I thought this means that the mysql wan't compiled in but -
> > then how comes the other mysql_ statements don't error.
> >
> > anyway the error I get is this
> > Supplied argument is not a valid MySQL result resource ...
> >
> > Now I am a C++ programmer so I am estimating here, it sounds like $row -
> > is wrong, do I need to set this up as an array (I believe that is what -
> > it is supposed to be)
> >
> > The $rs is right I am pretty sure and the command should do what I want-
> > it to do.
> >
> >
> >
> >
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: php/mysql error

2001-11-20 Thread torrentUK

I think you can get this error when you sql query fails.
Try copy and pasting the $sql query to the mysql command line and see what
response you get (it looks as though this would work though unless you
haven't got a table called "test").
I guess it might be that you are not successfully logging on (although I
can't recall whether that would then generate this error when you try and
issue a query or not). You should set up a "die" error path as well to help
you see if you fail to log in.

-torrent



"Jon" <[EMAIL PROTECTED]> wrote in message Usenet.ipsiitnr@localhost">news:Usenet.ipsiitnr@localhost...
> please review my script
>
> I have already had it said that the script is fine, please check.  IF
> it is then I have a set up proiblem which I would also like help to
> solve. BUT mysql outside of apache works fine.
>
> I started with an already set up apache so I don't know if mysql was
> installed in right, but the staements before the error seem to work so
> I would think so.
>
> I running my web server under red hat 7.0, I am new to apache/php and
> mysql.
>
> Thanks
>
> 
>
> I get an error when it hits the line
>
> while ($row = mysql_fetch_row($rs)) {}
>
> I know it won't do anything, just checking each command.
>
> For a moment I thought this means that the mysql wan't compiled in but -
> then how comes the other mysql_ statements don't error.
>
> anyway the error I get is this
> Supplied argument is not a valid MySQL result resource ...
>
> Now I am a C++ programmer so I am estimating here, it sounds like $row -
> is wrong, do I need to set this up as an array (I believe that is what -
> it is supposed to be)
>
> The $rs is right I am pretty sure and the command should do what I want-
> it to do.
>
>
>
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: PHP/MySQL Question

2001-11-12 Thread Julio Nobrega Trabalhando

  LIKE is a very good option. You can use:

LIKE \n'$id'\n;

  Or similar, where \n stands for the Mysql carriage return 'symbol'.

  Also, you may try selecting the whole text field, explod()ing contents by
carriage returns and checking with in_array() for the id if the above
doesn't works.

--

Julio Nobrega

A hora está chegando:
http://toca.sourceforge.net
"Peter Brown" <[EMAIL PROTECTED]> wrote in message
002401c16b3a$c51382f0$850ca8c0@peter">news:002401c16b3a$c51382f0$850ca8c0@peter...
> HI,
>
> New to PHP/MySQL,
>
> I was wondering if this was possible.
>
> I have a users database with an auto-incremented userID field.
>
> I have another message database (it's a message board database) - one of
> the fields is a TEXT field with userIDs separated by carriage returns;
> eg; if on one record userID 2 and userID 4 have both viewd that record,
> the data in that field will look as follows:
>
> 2
> 4
>
> I want to construct a SQL query for every user that logs in (I am
> storing their userID as a session variable) so that I can filter out any
> messages where a user has already viewed that record.  So in the above
> example that record should be filtered out if user 2 or user 4 has
> viewed the record.
>
> The query I constructed is:
>
> SELECT * FROM messages WHERE userID != '$userid'
>
> But this will not filter out any records like the one above where the
> userID in the message database is separaed by carriage returns as above
> (ie; it won't filter out messages for user 2 or user 4).
>
> Hope this makes sense
> Peter
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] RE: PHP/MySQL Question

2001-11-12 Thread Tim Ward

Use sql keyword LIKE, unless you have access to the design of the database,
in which case design it properly (i.e. something approaching normal form). 

Tim

--
From:  Peter Brown [SMTP:[EMAIL PROTECTED]]
Sent:  12 November 2001 05:28
To:  [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject:  PHP/MySQL Question

HI, 

New to PHP/MySQL,

I was wondering if this was possible.

I have a users database with an auto-incremented userID field.

I have another message database (it's a message board database) -
one of
the fields is a TEXT field with userIDs separated by carriage
returns;
eg; if on one record userID 2 and userID 4 have both viewd that
record,
the data in that field will look as follows:

2
4

I want to construct a SQL query for every user that logs in (I am
storing their userID as a session variable) so that I can filter out
any
messages where a user has already viewed that record.  So in the
above
example that record should be filtered out if user 2 or user 4 has
viewed the record.

The query I constructed is:

SELECT * FROM messages WHERE userID != '$userid'

But this will not filter out any records like the one above where
the
userID in the message database is separaed by carriage returns as
above
(ie; it won't filter out messages for user 2 or user 4).

Hope this makes sense
Peter


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] RE: [PHP] mySQL LOAD DATA INFILE

2001-11-06 Thread Niklas Lampén

Found the solution:

I had to change row

$fpName = tempnam($dir, "tableData");

to

$fpName = tempnam("", "tableData");

So file will be created to a temporary directory.


Niklas


P.S. :)


-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]] 
Sent: 6. marraskuuta 2001 14:56
To: Php-General; Php-DB
Subject: [PHP] mySQL LOAD DATA INFILE


I have this code:
 

 
It returns "Can't get stat of '/www/publico2/tableData0TMRRy' (Errcode:
13)".
 
I'd put this file into mySQL's database dir, but I have no access there.
Any ideas how to do this? Inserting file row by row would take like
eternity, so that is not a good idea.
 
 
Niklas


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: PHP & MySQL Queries...

2001-10-26 Thread Mike Frazer

> if ($row = mysql_fetch_array($result)) {
>
> /* Change all instances of db_table to match your db table structure */
> do {
>   PRINT "Your search results: ";
>   PRINT "db_table:  ";
>   print $row["db_table"];
>   print ("");
>   .
>   [ NUMEROUS REPETITIONS WERE HERE ]
>   .
>   PRINT "db_table:  ";
>   print $row["db_table"];
>   print ("");
>   print ("");
> } while($row = mysql_fetch_array($result));
> } else {print "Sorry, no records were found!";}



You can shorten this considerably using a while loop (see comments for
explanation):

// Get the results
$result = mysql_query($query);

// If a result was returned, you have a properly formed query
if ($result) {
// You can get a result and no rows.  Check for rows!
if (mysql_num_rows() > 0) {

// As long as there are rows in the result resource, keep printing
them
while ($row = mysql_fetch_array($result)) {
print "db table: " . $row["db_table"] . "";
}
print "";
}

// Good query, good result, but no rows returned.  No matches in the DB!
else { print "Sorrym no records were found!"; }
}

// If $result evaluates to FALSE then the problem is usually in your SQL
syntax
else { print "An error has occurred!  Check your SQL syntax!"; }


Using this format allows you to print only what is necessary.  At the same
time, if you had more results than you had spaces to print them, your
results would have been truncated.

If you want to be able to search multiple columns in your DB, you can for
your query as:

SELECT * FROM table WHERE (column1 LIKE '%$var%') || (column2 LIKE '%$var%')
[ continued for as many fields as necessary ]

Mike Frazer
Inverted Mind
http://www.invertedmind.com/




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: php + MYSQL based banner exchange system

2001-09-19 Thread Hidulf

they have something you need
http://phpwizard.net

--
Hidulf
http://www.hidulf.com
"Andrius Jakutis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello all,
>
> I need your recomendations, where to download from a good (profesional -
> many options) banner exchange system (subj.).
>
> I need it for free (I understand that not everything what is free is also
> good :) ).
>
> Any ideas?
>
> Sorry, if my message is offtopic.
>
> Sincerely,
> Andrius
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: PHP - MySQL

2001-07-25 Thread news.php.net

> The code should not be on the page which comes
> after clicking, but on the same page where the button is.

if this is the requirement, then look maybe use javascript



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: PHP - MySQL

2001-07-25 Thread news.php.net

Trick is to have a server side script which increments a counter and
redirects to the desired page.

So you'd create something like this:

/counter?uri=

and in your database you'll have fields for the uri and the number of hits
so far.

goodluck :)





"Pranot Kokate" <[EMAIL PROTECTED]> wrote in message
002101c114e6$f9f98f00$e80f0d0a@pranot">news:002101c114e6$f9f98f00$e80f0d0a@pranot...
Dear friends,

how can i monitor/count how many times a button is clicked. The code should
not be on the page which comes after clicking, but on the same page where
the button is. This is the need

pls help

regards,
pranot




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] RE: PHP Mysql apache economy hosting

2001-07-13 Thread Indri

Try http://www.aletiahosting.com/. I have my sites hosted by them.

Excellent support especially the ones via AIM/ICQ. The people are always
around to answer your questions.

Plans start at $9.95/month.

Hope this helps.

Best wishes,
Indri

>> -Original Message-
>> From: Ken Sommers [mailto:[EMAIL PROTECTED]]
> 
>> Hello,
>> can anyone recommend a good
>> PHP4/ Mysql/ apache/Unix-Linux economy web hosting co.?


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] RE: PHP Mysql apache economy hosting

2001-07-13 Thread Aral Balkan

You might want to try nomonthlyfees.com. I host two sites with them (that's
my only relation) and I've been happy so far. It's $200 up front then
$35/year which includes the domain name registration.

Aral :)
__
([EMAIL PROTECTED])
New Media Producer, Kismia, Inc.
([EMAIL PROTECTED])
Adj. Prof., American University
¯¯



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] RE: PHP Mysql apache economy hosting

2001-07-13 Thread Andrew Chase

I used Cedant.com to host my own site for a few months, and they were
excellent - no down time that I was aware of, and a handy web-based control
panel (and of course SSH shell access for anything not covered by the
control panel.)  Although they didn't have a large tech support phone bank
(Usually I'd leave a voice mail and get a call or e-mail back within a
couple of hours), their support was intelligent and very responsive.  I
think it was about $12.95/month for the plan I used, which included
PHP/MySQL on RedHat Linux 7.0 and plenty of traffic for my small needs.

-Andy

P.S.  I don't work for Cedant or anything, and the only reason I stopped
using them was that I got my own Linux/PHP/MySQL server going on an old
Pentium 200 at home - no 100% uptime guarantees, but I don't really get any
traffic to speak of so it's not a huge concern. ;-)

> -Original Message-
> From: Ken Sommers [mailto:[EMAIL PROTECTED]]

> Hello,
> can anyone recommend a good
> PHP4/ Mysql/ apache/Unix-Linux economy web hosting co.?


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: [PHP] MySQL fulltext indices and phrase search

2001-05-02 Thread Steve Werby

"Jens Kisters" <[EMAIL PROTECTED]> wrote:
> Hi there, is there a possibility to use MySQL's MATCH ... AGAINST to
> look for a string like "foo bar" ?
> 
> if i MATCH keyname AGAINST ('foo bar') i get resuts that match foo or
> bar, but not both of them separated by a space.
> 
> My guess is that the organization of the index doesn't allow this kind
> of search as it's based on single words , but maybe one of you has a
> better idea than
> to select the rows that contain both and hit those with LIKE '%foo bar%'

Perhaps you should ask on the mysql list.
List-Subscribe: 

-- 
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]