After a bit of research:
--
Rick Emery wrote:
$result = mysql_query(.)'
mysql_num_rows($result)
Hrm, this is resulting in:
bWarning/b: Supplied argument is not a valid MySQL result resource in
b./index.php/b on line b16/bbr
Rows
--
Rightfully so.
On 22 Mar 2002 at 16:41, Ashley M. Kirchner wrote:
Rick Emery wrote:
The query does get executed, and the record does get changed.
The code looks like this:
$conn = @MYSQL_CONNECT($host,$user,$password) ;
mysql_select_db($database, $conn);
$query = UPDATE clients SET
http://www.php.net/manual/en/function.mysql-affected-rows.php
On Fri, 22 Mar 2002, Ashley M. Kirchner wrote:
After a bit of research:
--
Rick Emery wrote:
$result = mysql_query(.)'
mysql_num_rows($result)
Hrm, this is resulting in:
bWarning/b: Supplied
oops. i see then my previous mail will not help in this case. wasn't
there something called 'affected_rows'? search the online manual for
'affected'.
On 22 Mar 2002 at 17:09, Ashley M. Kirchner wrote:
After a bit of research:
--
Rick Emery wrote:
$result =
Rasmus Lerdorf wrote:
http://www.php.net/manual/en/function.mysql-affected-rows.php
Thanks Rasmus. I did try that as well, same result. If I don't bother with the
$result, everything's fine. Like I said, the query runs, and gets executed. The DB
field gets changed as it should and all.
Chris wrote:
The query does get executed, and the record does get changed.
seems there is something wrong with the query, can you either echo the query and
feed it directly to mysql, (e.g. in phpmyadmin) see what happens?
Nope, the query's fine. I can run it manually, and through
Chris wrote:
oops. i see then my previous mail will not help in this case. wasn't
there something called 'affected_rows'? search the online manual for
'affected'.
I did. Read my reply to Rasmus as well. :) At this rate, I may just say to heck
with the $result, and always assume
But did you read the documentation? It states:
int mysql_affected_rows ( [resource link_identifier])
That's an optional link identifier. You don't feed it a result resource.
Just call it without any arguments. The affected rows is tied to a
database connection, not a result set.
-Rasmus
On
Rasmus Lerdorf wrote:
But did you read the documentation? It states:
Yes. But, reading it, and my brain actually registering what I was reading, now
that's a different story. :) It _is_ Friday after all. Thanks!
--
H | Life is the art of drawing without an eraser. - John Gardner
FWIW, straight from my code, with a few snips:
?
$sql = SELECT * FROM news ORDER BY id DESC LIMIT $limit;
$result = @mysql_query($sql);
print mysql_error();
if (!$result)
{
echo No database found.;
}
elseif(mysql_num_rows($result) == 0)
{
echo No records found.;
}
else
{
Justin French wrote:
$sql = SELECT * FROM news ORDER BY id DESC LIMIT $limit;
You're forgetting (or just didn't read my code), I'm UPDATE-ing, not SELECT-ing.
mysql_num_rows() doesn't work on UPDATE.
Anyway, thanks to Rasmus for pointing out my error.
--
H | Life is the art of
if ($postaction==edit)
-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 20, 2002 11:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] mysql update help needed
Can somebody straighten this out for me?
I can't get the update to work. I'm sure the
On Wed, 20 Mar 2002, ROBERT MCPEAK wrote:
$sql = UPDATE mytable SET
img_url=$img_url,visitdate=$visitdate,img_group=$img_group,display=$display,
caption=$caption where id = $id;
You need to surround non-numeric values with 'single quotes'.
$sql = update mytable set
Hello,
The length of VARCHAR must be specified like;
CREATE TABLE sailordata ( sailorid INT(8) NOT NULL DEFAULT 0,
lastname VARCHAR(255) NOT NULL,
firstname VARCHAR(255) NOT NULL,
middlenames VARCHAR(255) NOT NULL,
dob VARCHAR(255) NOT NULL,
telephone VARCHAR(255) NOT NULL,
On Tuesday, March 19, 2002, at 10:57 AM, Denis L. Menezes wrote:
I have three fields(input boxes) in a php form as follows :
$name
$rank
$age
My MySQL table is called tblAddress. I know how to connect, but I do
not
know the Insert statement. Can someone please advise me how I can
You don't have to have an index in order for an update to work, although indexes do
help performance a great deal when you are dealing with a lot of records. Do you have
Update permissions on the particular table/database you are working with?
Brian Drexler
-Original Message-
I have seen this problem before and, yes, an index field with
autoincrement is always a good thing to have.
Perhaps, this is not necessary, but usually works.
John
On Mon, 18 Mar 2002, Jennifer Downey wrote:
-Hi all,
-
-Just wondering, does a table have to have an index? If so what should I
On Monday, March 18, 2002, at 03:40 PM, Jennifer Downey wrote:
Just wondering, does a table have to have an index? If so what should I
consider when making a colum an index?
You're not required to have an index, as far as I know. It's just that
an index is a way of optimizing retrievals
Actually I've alreasdy worked it out- sorry
-Original Message-
From: caspar kennerdale [mailto:[EMAIL PROTECTED]]
Sent: 17 March 2002 10:31
To: [EMAIL PROTECTED]
Subject: [PHP] mysql fetch field
I seem to be getting unexpected information from a mysql fetch field query.
My table has
Maarten,
Perhaps table isn't the name of the table you want.
If mysql can't find the table (in line 13?), your $result variable is empty
and this causes (line 17?) to fail also.
Hope this helps,
Hugh
- Original Message -
From: Maarten Weyn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
: . mysql_error());
-Teresa
-Original Message-
From: hugh danaher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 8:27 PM
To: Maarten Weyn; php
Subject: Re: [PHP] mysql problems
Maarten,
Perhaps table isn't the name of the table you want.
If mysql can't find the table (in line 13
Read the manual about magic_quotes_gpc and addslashes()
I prefer to add slashes myself, that way I can verify input lengths but it
has the risk that I might miss a field. The trouble with magic_quotes_gpc is
that if you have to re-display a variable you have to stripslashes() first.
-
How about:
UPDATE table SET data = REPLACE(data, , )
For more information about the UPDATE query:
http://www.mysql.com/doc/U/P/UPDATE.html
For more information about MySQL string functions:
http://www.mysql.com/doc/S/t/String_functions.html
Robert Zwink
http://www.zwink.net/daid.php
Change the grant to:
grant all on * to clark@localhost identified by 'clark';
Then do a:
flush privileges;
I am trying to connect to the database like this:
$db=mysql_pconnect(localhost, clark, clark)
while in mysql do the following:
grant all on * to clark identified by 'clark';
1)Create the db in mysql: mysqladmin -u (your user name) -p (if you have
a password) create (new database name)
2)mysql -D (the name you used above) (the text file)
Works on Unix and 2000. Is that what you mean?
-Scott
On Mon, 4 Mar 2002, Wilbert Enserink wrote:
Hi all,
I have a
Well,
Run mysql with that file as input.
I work on Linux and I do something like:
mysql -ppassword DBNAME dump.sql
Where
DBNAME is the name of the database,
dump.sql is the text file,
password is my password.
(I think I did something on Windows months and it
worked.)
--- Wilbert Enserink
On Monday, March 4, 2002, at 02:26 PM, Jason Whitaker wrote:
OK, I need to know is there a place where i can find out how to pull
information(TEXT) from a MySQL DB table and print where i place a
variable
in a php page?
This tutorial was my introduction to the concept, but you can find
This tutorial was my introduction to the concept, but you can
find this
information in a hundred other places:
http://hotwiredlycoscom/webmonkey/programming/php/tutorials/tutorial4html
I'd recommend that tutorial only as a guideline for using mySQL and php Don't try to
use the
On Monday, March 4, 2002, at 03:29 PM, Matt Schroebel wrote:
I'd recommend that tutorial only as a guideline for using mySQL and
php. Don't try to use the obfuscated logic in the final example as a
good way to code an add/change/delete page. It's much easier if there
are radio buttons
I don't really remember the tutorial very well I thought it
did a fine job of explaining some of the basics I spent a few hours
with it and felt pretty good However, I agree that it's not a good
intro to PHP's basic features
I stumbled on php a few years ago, and that was my intro
Erik Price wrote:
I haven't seen yet a tutorial that teaches coding from the perspective
of using register_globals off, which I think is pretty important
(personal opinion) It's not that hard to pick up, though, once you've
gotten started Still, I think it makes alot more sense to do so
.cfm are ColdFusion files(like .php or .pl)
Regards,
Andrey
- Original Message -
From: Sean Kennedy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, March 01, 2002 7:36 PM
Subject: [PHP] mysql and telnet.
Hello,
Thanks for the advice... But now I need to know what all this
What do you want to know?
Is my ISP offering mysql ?
Is it available to me ?
Is it installed on this particular server ?
WHAT?
If you would like to use MySQL, you should have *access* to a
mysql server If you don't know a username and password, you probably
haven't
And as you say it, you
After the loop has finished executing add another line
if ($i % $cols != $cols-1) { print /tr; }
Otherwise once the loop has finished if not EXACLTY $i % $cols == $cols-1
then there would be no /tr after the last row which could cause display
problems in the user agent (other than the fact
'; php-general-list
Subject: RE: [PHP] mysql php - while loops
with a bit of cheating... use a table...
(nb: this code not tested, but logic has)
table
?
$results = mysql_query(SELECT ID, date, appleprice, orangeprice, pearprice
FROM fruits);
$i = 0; $cols = 4
while ($data = mysql_fetch_array
with a bit of cheating... use a table...
(nb: this code not tested, but logic has)
table
?
$results = mysql_query(SELECT ID, date, appleprice, orangeprice, pearprice
FROM fruits);
$i = 0; $cols = 4
while ($data = mysql_fetch_array($results))
{
if ($i % $cols == 0) echo tr
?
td?=$data[date]?
can you supply some examples please
-Original Message-
From: Alexander P. Javier [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 26, 2002 10:34 AM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL joins
why do i get errors on MySQL queries that have joins?
alyx
Try this instead:
SELECT *, DATE_FORMAT(appointment.startdatetime, '%m-%d-%y') AS yrappt
FROM appointment
LEFT JOIN guest USING (appointment_id)
That should work, but I don¹t know what your table is like so I can only
guess all the required elements are there.
Rick
Every person you meet - and
Yes. MySQL is as stable as the box you run it on. ;)
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
-Original Message-
From: jtjohnston [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 24, 2002 10:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] mysql 4 windows
Does anyone
- Original Message -
From: Navid Yar [EMAIL PROTECTED]
$query = select email from customers // Check for duplicate
entry
. where email = $email;
$query = stripslashes($query);
$result = mysql_query($query);
$num_results = mysql_num_rows($result); // Get the number of
rows in
Ok, I'm over it. Now...
Does anyone know how to set up MySQL, or phpMyAdmin to restrict users to a
single database? For instance, the user JoeBlow...
Joe has a database called JB, I want him to have full access to it and
nothing else. How would I go about doing this? I'd also like him to
Liam MacKenzie wrote:
And also...
How do I go about securing PHP functions. For example, at the moment Joe
can upload a PHP script that deletes /etc/named.conf. NOT GOOD!
Surely this is a general security issue? If an ordinary user is allowed
to delete /etc/named.conf (whether by PHP,
No, you're right..
Permissions for that file could probably be tighter,
but it's better not to rely on file system permissions only.
bvr.
And also...
How do I go about securing PHP functions. For example, at the moment Joe
can upload a PHP script that deletes /etc/named.conf. NOT
Perhaps a better way of wording my question would have been to say this:
At the moment, I can make seperate users, the do not have
permission to create tables in other databases, but the can
still browse them and view the information.
Any the example I used for the named.conf was a bad one.
Liam MacKenzie wrote:
permission to create tables in other databases, but the can
still browse them and view the information.
I do not know MySQL but I'd be very surprised if this was not a database
creation/configuration issue. In postgres, unless given permission, I
cannot even connect to
Peter,
I have a quick MySQL question...if this is not the correct forum for
it, then someone please point me to the right one.
Can the UPDATE statement have conditional check embedded in it? I
have a page that displays a record (in a FORM format) that the user can
change the
-Original Message-
From: Dave Barry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 12:05 AM
To: Ben Clumeck
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL Install Problem
On 20 0, Ben Clumeck [EMAIL PROTECTED] wrote:
I am trying to install MySQL on WinXP, I get
' is not recognized as an internal or external command,
operable program or batch file.
Any suggestions?
Ben
-Original Message-
From: Dave Barry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 07, 2002 12:05 AM
To: Ben Clumeck
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL
Look-up GRANT PRIVILEGES in the mysql manual. That should get ya going
-Original Message-
From: Roman Duriancik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 06, 2002 1:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Mysql
Pleae help me !
I need delete record from table
PROTECTED]
To: Emiliano Marmonti [EMAIL PROTECTED]
Date: Wednesday, February 06, 2002 12:45 PM
Subject: Re: [PHP] Mysql question
This is really a question for a MySQL mailing list, not a PHP list since
this question has nothing to do with PHP. You can email the MySQL mailing
list at [EMAIL
On 20 0, Ben Clumeck [EMAIL PROTECTED] wrote:
I am trying to install MySQL on WinXP, I get the following error message:
Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.
C:\DOCUME~1\BENcd c:\mysql\bin
C:\MYSQL\BINmysqld--standalone
'MYSQLD--STANDALONE' is not recognized
Hello val,
a have following mysql problem:
i need to execute several inserts at one query like this-
$sql-action(insert into words(word) values ('php');
insert into words(word) values ('general');
insert into words(word) values ('list'););
The word fild is unique
My problem is: when
what happens if you do this?
$result = mysql_query(SELECT MAX(Thought_Num) as Thought_Num FROM
quotes,$db);
I'm thinking that the column name in your original query is being called
MAX(Thought_Num) and not Thought_Num.
Martin
-Original Message-
From: Melanie Gann [mailto:[EMAIL
On Tue, 2002-02-05 at 15:12, Melanie Gann wrote:
Thank you all you listeners out there. I'll try to be respectful of your
time and patience, and apoligize in advance for my greeness - I am 2
weeks into PHP/MySQL.
I am trying to select the higest value from the column Thought_Num below.
But
Suppress the error message:
$result = @mysql_query(sql statement,$db);
DL Neil, thank you: INSERT IGNORE is exactly what i need. You helped me
greatly!
Matt, thaks you for help too, but my non-perfect english doesn't allow me to
express my thoughts correctly.
Thanks!
Valentin Petruchek (aki
Use PHPMyAdmin. You can dump to a CSV file or it can output all of the
INSERT statements to rebuild a table.
- Original Message -
From: Wilbert Enserink [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 8:22 AM
Subject: [PHP] mysql backup function in php?
Hi
Take that a little further and extract the code from phpMyAdmin for use in
your own project.
Miles
At 08:36 AM 2/4/2002 -0800, Mike Maltese wrote:
Use PHPMyAdmin. You can dump to a CSV file or it can output all of the
INSERT statements to rebuild a table.
- Original Message -
From:
If I understood you correct, you want to know the amount of the rows in
your table.
Here you go (Assuming ID is the field you use to ident your rows):
...count(ID) AS CountValue...
then treat CountValue as any field in a table.
Niklas
-Original Message-
From: Mason Batley
When PHP says it has MySQL support it is just that..support. You still
have to install MySQL (www.mysql.com). Assuming you have done that the
it is just a matter of reading the MySQL documentation.
--Tony
On Wed, 2002-01-30 at 08:28, Wilbert Enserink wrote:
Hi all,
maybe one of you can
Note that you can do this:
print $row[field_name];
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
-Original Message-
From: Bryan Gintz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 11:49 AM
To: PHP List
Subject: [PHP] MySQL Fetch_Array VS. Fetch_Object
my question to you is, why do you want to put them into another variable?
the $row[field_name]; is already a variable. why not just use that
instead?
Jim Lucas
- Original Message -
From: Bryan Gintz [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 10:48
oh and mysql_fetch_object is a little slower then mysql_fetch_array()
Jim Lucas
- Original Message -
From: Bryan Gintz [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 10:48 AM
Subject: [PHP] MySQL Fetch_Array VS. Fetch_Object
Does anyone know what
Personal preference, and all my code is written with that so far, but
seeing about the speed issue, that might change.
Thanks.
Jim Lucas [php] wrote:
oh and mysql_fetch_object is a little slower then mysql_fetch_array()
Jim Lucas
- Original Message -
From: Bryan Gintz [EMAIL
There is no performance/speed issue, the two are identical in speed.
This is a personal preference issue. Although, extract() does not
work on objects, only arrays.
Also, when using _fetch_array, use the second optional parameter,
for example:
$row = mysql_fetch_array($result,
for the tip.
Regards,
Greg.
-Original Message-
From: Steve Werby [mailto:[EMAIL PROTECTED]]
Sent: 30 January 2002 22:41
To: Greg Conway; Php-General
Subject: Re: [PHP] MySQL-PHP-RAQ4 dilemma!
Greg Conway [EMAIL PROTECTED] wrote:
I'm trying to add MySQL to my RaQ4. It came
running okay! I have Db Tools querying the Db okay from
outside the machine!!
Anyway, thanks for the tip.
Regards,
Greg.
-Original Message-
From: Steve Werby [mailto:[EMAIL PROTECTED]]
Sent: 30 January 2002 22:41
To: Greg Conway; Php-General
Subject: Re: [PHP] MySQL-
In article [EMAIL PROTECTED], [EMAIL PROTECTED]
says...
Hi Steve,
Thanks. I have tried this (the line was not there), but still I have my
original problem. I am now suspecting it is more than a PHP problem, as I
have the same problem with Zope (where I have PHP installed :) but I don't
On Thursday 31 January 2002 13:48, Mason Batley wrote:
G'day
I keep getting an error message of :Warning: Supplied argument is not a
valid MySQL result resource in /var/www/html/RageProject/StripPlayList.php
on line 100 Rows:
$link = mysql_connect(127.0.0.1, rage, rage);
I keep getting an error message of :Warning: Supplied
argument is not a valid MySQL result resource in
/var/www/html/RageProject/StripPlayList.php on line 100
[snip]
Can someone explain why.. I've been trying to work it out for 2 long.
If there's no result set, it's because the query you
Maybe a dumb question, but are you sure you have the fields id, songname and
artist in a table named rage in a database named rage?
The times I got that error was because a non-existent field or a
non-existent table.
Otherwise, everything looks ok.
Alex.
- Original Message -
From:
I don't know what the manual says, but if I were you I'd check this:
mysql_select_db($db,$link) or die (Can't log in at this time);
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 9:51 PM
Subject: Re: [PHP] mysql
Do you know where I can find a recent and objective study comparing both
with PHP to connect to it.
http://phpbuilder.com/columns/tim2705.php3
HTH
-jeff
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Don't use MySQL its way to primitive.
Go for Postgresql.
I worked with both of them with PHP and they both fast, stable and supported
--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
Both work well with PHP. Later versions of PostgreSQL are quite fast
(comparable to PHP). MySQL is still a little faster and there seems to be a
much larger base of users and support. You can't go wrong with either one...
if you need the features that PostgreSQL offers that MySQL currently lacks
Ben,
Making the assumption that you plan on using php as the language to place or
extract data from the mysql database, you'll need to:
open a mysql database on-line (or have the site manager do this for you)
Write a php interface program which would write to, change or extract data
from the
Hi
If you haven't got shell access but have a PHP enabled webserver then you
could try and install phpMyAdmin:
http://www.phpwizard.net/projects/phpMyAdmin/
Regards
Girish
--
www.girishnath.co.uk
- Original Message -
From: Ben Clumeck [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
Hi,
You can do the exact same thing but instead of connecting to localhost,
you connect to the remote server.
To do this with the mysql monitor tool, use the -h command line option, followed
by the hostname or IP of the server.
If you cannot access the online database directly (possibly for
Hey Uma
call to undefined function, well thats exactly what it means (it doesnt like
the function specified eg mysql_connect)this means that your php
installation does not have support for mysql.
You can check this with the following
?php
phpinfo();
?
run this via a browser and check the
On Tuesday 29 January 2002 15:29, Uma Shankari T. wrote:
Hello,
How do i check php support mysql..
If any one came to know this tell me...
You have already been told how to. See the posting by Chris in response to
your posting about the same question just a little while ago.
--
When records are deleted, the space they occupied are marked as vacant. New
records are inserted into those locations.
That said, since this is a relational database, it really doen't matter
where the new records are inserted.
If you want the nitty-gitty details of MYSQL or help, go to the the
That's how databases work. There is no implied ordering internally. An
order is only applied if you add an order by clause on a select.
-Rasmus
On Thu, 24 Jan 2002, Phil Schwarzmann wrote:
When Im adding rows into my MySQL database using PHP, it seems to put
them in random places in the
If you are using a table with AUTO_INCREMENT set for one of the fields,
the default is for MySQL to assign any new row an AUTO_INCREMENT value
that is one higher than the currently highest value in that column. In
other words, MySQL by default does exactly what you say you are trying
to do.
If you're trying to be able to keep reference to the order the records are
added to the table, simply add a date/time field and populate it with the
date/time now() when you insert. You can then sort on that as needed later.
- Original Message -
From: Phil Schwarzmann [EMAIL PROTECTED]
(particularly if
you're asking us to read it to help you), and (b) for machine parsing requirements.
=dn
- Original Message -
From: hugh danaher [EMAIL PROTECTED]
To: Brandon Orther [EMAIL PROTECTED]
Cc: Php-General [EMAIL PROTECTED]
Sent: 18 January 2002 01:14
Subject: Re: [PHP] MySQL and PHP
What is the error that you are getting?
--Sam
- Original Message -
From: Brandon Orther [EMAIL PROTECTED]
To: PHP User Group [EMAIL PROTECTED]
Sent: Thursday, January 17, 2002 5:25 PM
Subject: [PHP] MySQL and PHP
Hello,
I am trying to use mysql through php. When I try to run
Brandon,
Try using single quotes rather than doubles in the values e.g.
('something','something else')
hugh
- Original Message -
From: Brandon Orther [EMAIL PROTECTED]
To: PHP User Group [EMAIL PROTECTED]
Sent: Thursday, January 17, 2002 2:25 PM
Subject: [PHP] MySQL and PHP
Hello,
I
on 1/16/02 11:57 AM, Mike Krisher at [EMAIL PROTECTED] wrote:
someone here has to know the syntax for using multiple items in a where
definition, something like:
$values = 120106,120095;
$sql = SELECT * FROM products WHERE catalognumber = $values ORDER BY
price;
select * from products
When you got your CREATE TABLE statement ready, run it from a PHP script,
just like you would with any other query. Ofcourse you need to use a login that is
able to 'create'.
bvr.
On Tue, 15 Jan 2002 03:46:47 +0300, -=LukA=- wrote:
Hello php-general,
Hi everybody
Please help me.
If
Even though this is OT as it is not a PHP question it is an easy one :)
Please see the following URL:
http://www.mysql.com/documentation/mysql/bychapter/
It is the MySQL manual broken out by chapter.
You will find the next URL particularly useful as it is the syntax for the create
Hi,
Sorry if I am being a rude, but you need to read the
document on how to create a table:
www.mysql.com
and
www.php.net (assuming that you will use php)
thx.
--- -=LukA=- [EMAIL PROTECTED] wrote:
Hello php-general,
Hi everybody
Please help me.
If i want to create a table in some
You need some tutorials on using MySQL and PHP.
There are some good ones at thickbook http://www.thickbook.com,
you can also search, using Google, for tutorial MySQL PHP. You will find
good ones at
WebMonkey, DevShed and Zend.
Good luck and welcome - Miles Thompson
At 03:46 AM 1/15/2002
Well, did you try looping though tables with mysql_fetch_array($tables)?
But, how 'bout mysql_list_tables()?
Cheers - Miles Thompson
PS There's a bunch of other interesting stuff relating to database
manipulation there too. /mt
At 11:48 AM 1/12/2002 -0800, Chris wrote:
I'm trying to display
Does anyone have any idea why this is giving me a Warning: Supplied
argument is not a valid MySQL result resource in... error?
You'll have to give more code, which line you get that error from, etc., to
give us a better idea why it's not working.
However, a quick tip:
$crdate = date(Y-m-d);
Hi,
So far the best way to troubleshoot mysql+php for me has been to add an or die after
the sql exec.
$crdate = date(Y-m-d);
$result = mysql_query(SELECT * FROM sites WHERE creation_date = '$crdate'
AND status = 'T') or die ('CAN NOT EXEC SQL');
Or you can do
$sql = SELECT * FROM sites
Hi Andras,
$aresult=mysql_query(select * from orders WHERE (a3 = CURDATE()-$datec)
,$db);
what's the value of $datec? integer 7 or 14?
if so then try to change it to this: interval 7 days
--
Jimmy
Love deeply and passionately. You might get hurt but it's the only
Here's the example from the PHP manual:
The tutorial here are very helpfull:
http://www.melonfire.com/community/columns/trog/
-- David
?php
// Connecting, selecting database
$link = mysql_connect(mysql_host, mysql_login, mysql_password)
or die(Could not connect);
print Connected
Jackson
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, December 31, 2001 1:48 AM
Subject: Re: [PHP] MySQL problem
Here's the example from the PHP manual:
The tutorial here are very helpfull:
http://www.melonfire.com/community/columns/trog/
-- David
?php
* GoodFella ([EMAIL PROTECTED]) [Dec 30. 2001 21:10]:
Thanks for the quick reply. I used the PHP manual example and it connects
to the database successfully but cannot select the database.
So you are using this line:
mysql_select_db(booktest);
Correct? What does the server say in
: Re: [PHP] MySQL problem
Here's the example from the PHP manual:
The tutorial here are very helpfull:
http://www.melonfire.com/community/columns/trog/
-- David
?php
// Connecting, selecting database
$link = mysql_connect(mysql_host, mysql_login, mysql_password)
or die
- Original Message -
From: David Jackson
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] ; [EMAIL PROTECTED]
Sent: Monday, December 31, 2001 2:41 AM
Subject: Re: [PHP] MySQL problem
I almost forgot add a or mysql_error() for each line like this:
?php
// database connect script
1301 - 1400 of 1710 matches
Mail list logo