Read the MySQL docs and find out!
MT
At 10:27 AM 4/24/2002 +0300, Marius Ursache wrote:
hi
how many columns can have a mysql table?
tnx
--
Marius Ursache (3563 || 3494)
\|/ \|/
'/ ,. \`
/_| \__/ |_\
Jeff,
I have a form where someone enters the body of an email message
into a textarea part of a form to be sent out to a list. Then a
script
retrieves the body and sends it via email. However I can't get line
breaks
to show up (I'm using MS Outlook) even if I enter the \n into the
textarea
Hiya,
If I remember correctly, you much send both \r and \n to terminate a line
on an e-mail, regardless of the platform. This should include the header
aswell.
At 12:00 14/04/2002 +0100, DL Neil wrote:
Jeff,
I have a form where someone enters the body of an email message
into a textarea
How do I get it to do that? I tried replacing \n with \r\n but it's not
even finding any \n. This is really puzzling me. If I copy the data
from the database field using MySQL-Front and paste it into a word
processor it will have the line breaks retained. But what is it in the
data that shows
Jeff,
Is there something about the evaluation of \n in different types of
strings, eg single quotes/double quotes? (I don't know the answer)...
FWIW I don't like (perhaps, I don't trust) the \r\n type of short-cuts.
Herewith some sample code:
...
$LinkText= Requested data can be
check out nl2br() function [newline to break]
http://www.php.net/manual/en/function.nl2br.php
olinux
Jeff Oien wrote: I have a form where someone enters
the body of an email messageinto a part of a form to
be sent out to a list. Then a script retrieves the
body and sends it via email.
This isn't what I'm looking for because the output is to email not HTML.
What I would like is the natural line breaks in the form input to be
preserved and then result in line breaks in the email without having
to add any \n, which didn't work anyway.
Jeff Oien
check out nl2br() function
i think the problem is bad syntax:
you should try:
mysql_query(update prod_list set prod_manu=$prod_man where sku='.$prod.');
that is because when you have single quotes you will not evaluate the
expression so your querry will do the update only for sku equally with
the string '$prod'...
hope
Jason, this is intriguing.
Please show us a bit more code before the mysql_query() call.
-Original Message-
From: Jason [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 1:54 AM
To: Php-Db
Subject: [PHP-DB] MySQL/PHP Update
I'm trying to update my MySQL database, but it
On Thursday 28 March 2002 17:04, cristi radulescu wrote:
i think the problem is bad syntax:
you should try:
mysql_query(update prod_list set prod_manu=$prod_man where
sku='.$prod.');
that is because when you have single quotes you will not evaluate the
expression so your querry will do
Emery [mailto:[EMAIL PROTECTED]]
Sent: March 28, 2002 7:20 AM
To: 'Jason'; Php-Db
Subject: RE: [PHP-DB] MySQL/PHP Update
Jason, this is intriguing.
Please show us a bit more code before the mysql_query() call.
-Original Message-
From: Jason [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March
First create the PHP script to connect to the database and empty the table
(DELETE FROM table;) as if you were going to visit the page manually every
time you wanted to empty the table. This shouldn't be too hard:
?
// EmptyTable.php
$dbLink = mysql_connect(host,user,pass);
Hi Jenn,
There are a couple ways you can do this.
You can write a unix shell script and run it periodically at the cron.
Here:
#!/bin/mysql
query=DELETE FROM tablename
/usr/bin/mysql -u USER -pPASSWORD -D database -e $query
And then you can just put this script into cron, see:
I'm trying to update my MySQL database, but it doesn't seem to be taking.
my code is:
mysql_query(update prod_list set prod_manu=$prod_man where sku='$prod');
Try: mysql_query(update prod_list set prod_manu='$prod_man' where
sku='$prod');
Maxwell
--
PHP Database Mailing List
Jason a écrit :
I'm trying to update my MySQL database, but it doesn't seem to be taking.
my code is:
mysql_query(update prod_list set prod_manu=$prod_man where sku='$prod');
where
prod_manu is an int
$prod_man is an int
sku is a varchar
$prod is text
mysql_query()
See the manual at php.net:
addslashes()
stripslashes()
I've found it easier to just turn on magic-quotes in the php.ini file
This is all covered at php.net
Robert
- Original Message -
From: Nick Patsaros [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Why don't you just do the sql insert *after* the file upload function?:
Pseudocode:
if( NOT file upload attack, wrong file type, etc.){
//copy the file to the permanaent location
//call function to insert file details into the database
}
else{
//echo error to user
Hi Chris
I have delete working perfectly by doing the following:
include(connectionstart.php);
mysql_query (DELETE FROM emaillist WHERE EMail = '$email'
);
However, how do I return a true or false flag whether the row was
deleted or
not? I basically need to know how to do a 0 or 1 I
mysql_affected_rows(int resource_id);
This will return the number of rows that were affected by the last
operation, so you could do something like this:
if(mysql_affected_rows($connection) == 1){
//insert, update or delete succeeded
}else{
//operation failed
}
- Original Message
non-persistent.
I would also like to ask the difference between persistent and
non-persistene connection?
Ray Hunter [EMAIL PROTECTED] ¼¶¼g©ó¶l¥ó
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
What type of connections are you making persistent or non-persistent?
Ray Hunter
Firmware Engineer
What type of connections are you making persistent or non-persistent?
Ray Hunter
Firmware Engineer
ENTERASYS NETWORKS
-Original Message-
From: Killer Angel Clark [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 10:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql
On Fri, 2002-02-22 at 09:37, Caleb Walker wrote:
I keep on getting this error statement:
Warning: Supplied argument is not a valid MySQL result resource in
/usr/local/www/data/phone/insert2.php on line 10
2
Can someone tell me what is wrong with the code below, I just cannot figure
it
On Wed, 2002-02-20 at 13:16, Sven Jacobs wrote:
You can do it like this
calculate the current day and extract 7 days of it
ehm? extract 7 days of it? from what?-) I'm not quite following...
then with an array the current day until the calculated day :-)
ehm, call me stupid, but I didn't
it works for me. What do your data and table structures look like?
-Original Message-
From: Fredrik Wahlberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 4:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql LIMIT and ORDER BY problem
I have a strange problem with
Yes you sure can,..
When you insert a row just use one of the older values that no longer exists
on the table.. Alternatively, you can insert a blank value, mysql will
automatically set it to the next value after the highest one in the table
and then you can update it to one of the older values.
First, what do you mean by regs?
If I understand your question, you want to know if mysql will re-use an old
auto_increment value that has been deleted. The answer is yes and no.
If you say: DELETE FROM mytable;
then the next insertion will cause the auto_increment value to begin at 1
If you
When you include $Select in your URL, did you remember to urlencode() it
first? If no, the spaces will blow your URL away...very nasty...
BTW, it helps if you post code.
-Original Message-
From: jeff akerman [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 11, 2002 4:27 PM
To: [EMAIL
Jeff,
I solved the problem by using a different frame for each drop down
menu. In my case I had 5 drop down menus interacting together and
selecting their values from the database.
Then I'm passing the value of each variable to the other frames
(affected by the selection) using a javascript
If your not really a text MySQL guy I would highly recomend PHPMyAdmin. Its
a set of PHP scripts you can upload into its own directory and run
immediately. It will allow you to download (through the web interface) the
entire database, and then move it to the new site (using the same tool.)
I've
Hello,
something that you can help is the follow
try var_dump($newquery);
then you see the complete query and run it in phpmyadmin.
Jeroen
- Original Message -
From: Jonathan Underfoot [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 08, 2002 2:43 PM
Subject: [PHP-DB]
Yes, you can re-select from the same database without opeing a new
connection.
I recommend that you print the contents od $newquery to verify it contains
the string you think it should. Perhaps the apostrophes you've enclosed the
$row[] variable are not expanding.
-Original Message-
Jonathan,
I'm trying to write a script that checks for multiple entries on a table in a
database. So far I've been
plagued by MySQL errors. I'm fairly confident my scripting is ok (Then again, I've
been wrong before.) I think
moreover there might be some difficulty with my theory. Then
What does bool(false) mean?
Thats off the vardump
-J
- Original Message -
From: Jeroen Timmers [EMAIL PROTECTED]
To: Jonathan Underfoot [EMAIL PROTECTED]
Cc: [PHP-DB] [EMAIL PROTECTED]
Sent: Friday, February 08, 2002 8:58 AM
Subject: Re: [PHP-DB] MySQL / PHP Database Help
Hello
, February 08, 2002 8:48 AM
To: Jeroen Timmers
Cc: [PHP-DB]
Subject: Re: [PHP-DB] MySQL / PHP Database Help
What does bool(false) mean?
Thats off the vardump
-J
- Original Message -
From: Jeroen Timmers [EMAIL PROTECTED]
To: Jonathan Underfoot [EMAIL PROTECTED]
Cc: [PHP-DB] [EMAIL PROTECTED
PROTECTED]
Sent: Friday, February 08, 2002 3:47 PM
Subject: Re: [PHP-DB] MySQL / PHP Database Help
What does bool(false) mean?
Thats off the vardump
-J
- Original Message -
From: Jeroen Timmers [EMAIL PROTECTED]
To: Jonathan Underfoot [EMAIL PROTECTED]
Cc: [PHP-DB] [EMAIL PROTECTED
Jonathan,
[have put the cc back to the list]
Is it possible to make BOTH the date and venue into a single unique index?
=Why not? Like a good woman, treat her right, and SQL will do almost anything for you:
6.5.3 CREATE TABLE Syntax
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name
Easiest way is to download and install phpMyAdmin.
http://phpmyadmin.sourceforge.net/
HTH
Richy
-Original Message-
From: Morten Nielsen [SMTP:[EMAIL PROTECTED]]
Sent: 04 February 2002 16:34
To: [EMAIL PROTECTED]
Subject:[PHP-DB] MySQL
Hi,
Is there an easy way to see
Go download PHPMyAdmin.
- Original Message -
From: Morten Nielsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 8:34 AM
Subject: [PHP-DB] MySQL
Hi,
Is there an easy way to see the data in a table?
I made a table that contains information about people. How
Lovatt [mailto:[EMAIL PROTECTED]]
Sent: 04 February 2002 16:30
To: Morten Nielsen
Subject: RE: [PHP-DB] MySQL
phpMyAdmin!
http://phpwizard.net/projects/phpMyAdmin/
HTH
Peter
---
Excellence in internet and open source software
I'm just learning MySQL and PHP so this fresh from my last snoop through the
documentation, hope it will help.
From the command line you can make a global query like - SELECT * FROM pets;
and all the info stored in the table will be shown.
To update a record use the update query:
UPDATE pet
On Monday 04 February 2002 10:54 am, you wrote:
Hi all,
Ok I am learning this on my own but I could use some help.
I have started these two pages test.php and config.php here is the code:
test.php
?
// include the database configuration
include config.php;
In looking at my include page
on 2/4/02 12:54 PM, J Leonard at [EMAIL PROTECTED] appended the following
bits to my mbox:
mysql_connect($db[host],$db[user],$db[password],$db[database]) or
The above function call only has three parameters. The database isn't
specified in the connect call but selected later. Try:
mysql_connect() function only takes 3 arguments (servername, username, pass)
.
Select your database by using mysql_select_db() function...
Try to rewrite the code as:
mysql_connect($db[host],$db[user],$db[password]);
mysql_select_db($db[database]);
Refer to:
Correct your example as follows:
$sql = UPDATE $table_name SET new_area=\$new_area\;
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 26, 2002 10:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Update command syntax
Could anyone help me out with the
A number of connection classes and abstraction toolkits already exist. Your
PHP 4.x install probably came with PEAR's DB.php abstraction layer. Save
yourself the trouble perhaps?
jas said:
So all I would need to do is create a file named db_connection.php3 and
put in the functions
Ok just to clear it up... our server is not running php4 unfortunately. =)
Dave Richardson [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
A number of connection classes and abstraction toolkits already exist.
Your
PHP 4.x install probably came with PEAR's
, Oracle, etc.) .
Does this help???
Gurhan
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 12:33 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Connection Class
So all I would need to do is create a file named db_connection.php3 and put
Does this help???
Gurhan
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 12:33 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Connection Class
So all I would need to do is create a file named db_connection.php3 and
put
in the funct
On Tuesday 22 January 2002 22:35, Johannes Hiemer wrote:
First of all, please keep the discussion on the list!
What did you want it to do?
I want it to do things like inserting into Mysql-dbs
Fetching arrays. Just every Mysql-command which
Is also suported in PHP.
What is it doing now?
On Monday 21 January 2002 21:52, Johannes Hiemer wrote:
Hi,
i coded a Mysql-Class, there are no compiling-errors when i run it.
But the problem is that it doesn´t do what i want it to do.
I added the sourcecode below and would be happy for any sugestions
how to make it better.
[snip]
What
Morten,
What's your level of knowledge of both databases and PHP? Please have a
look at the Introductory Tutorial (Link at the top left of www.php.net). At
the end of that tutorial, which is admittedly rudimentary, there are links
to more advanced ones, including ones specifically for user
As Brian Clark just pointed out on php-general, in response to another
issue ...
http://www.faqts.com/knowledge_base/index.phtml/fid/51/
Some very specific refernces. You'll find what you need there.
Miles
At 06:08 PM 1/19/2002 +0100, Morten Nielsen wrote:
Hi,
Could anybody explain to me how
Jerry,
For a command line interface, you can use either putty or TerraTermSSH. I
prefer the former and it's available at
http://www.chiark.greenend.org.uk/~sgtatham/putty/ . The latter is more
Windows-ish.
For a Windows-like interface, through a browser, there is phpMyAdmin, and
others, but
If you're running a web server on your Linux box
then simply download, install and use phpMyAdmin.
All your management is then down through web pages.
I use it all the time.
HP
-Original Message-
From: Jerry [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 16 January 2002 10:48 PM
To:
shouldn't it be PASSWORD('madonna') ??
-Original Message-
From: Necro [mailto:[EMAIL PROTECTED]]
Sent: 11 January 2002 04:39
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
http://www.hotscripts.com/Detailed/4219.html --- that is the script
But I cannot use crypt
The use of the MD5 function in the query doesn't look quite right.
Shouldn't it be MD5('$password') or MD5('$username'.'$password') if
concatenating?
Also, mysql_db_query() has been a deprecated function for some time now,
mysql_query() is recommended.
Hope this gets you going - Miles
argument is not a valid MySQL result resource in
d:\htdocs\infekt\packages\auth.inc on line 104
Andrew
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:05 AM
To: Necro; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource
MySQL result resource in
d:\htdocs\infekt\packages\auth.inc on line 104
Andrew
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:05 AM
To: Necro; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource
The use of the MD5 function
() );
$row = mysql_fetch_array($result);
Andrew
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:36 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Break up the code.
I assume you are connecting to the database
() );
$row = mysql_fetch_array($result);
Andrew
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:36 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Break up the code.
I assume you are connecting to the database
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 3:08 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Can you try this puppy at the MySQL console? I'd dearly love to know where
andrewd is coming from, it sounds
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 4:09 PM
Subject: RE: [PHP-DB] MySQL Result Resource
Yep,
andrewd is the username im trying to get this script to work with, its an
authentication script..
The result of echo $arg is the following:
select password, 1
PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource
I was having something similar and solved it by wrapping the column names in
parentheses:
select password, 1 as auth from acl where (username='andrewd' and
password=MD5(andrewd.madonna));
It might help. or eliminate something if I'm
try this :
select password, 1 as auth from acl where (username='andrewd' and
password=MD5(andrewd.madonna));
- Original Message -
From: Necro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 6:18 PM
Subject: RE: [PHP-DB] MySQL Result Resource
Same error
table 'andrewd' in where clause
Andrew
-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 3:08 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Can you try this puppy at the MySQL console? I'd dearly love to know
2002 3:28 AM
To: Necro
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource
try this :
select password, 1 as auth from acl where (username='andrewd' and
password=MD5(andrewd.madonna));
- Original Message -
From: Necro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday
[mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 3:29 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
LIGHT just came on!!! Why does ittake so long.
MD5(andrew.madonna) - I think you're goint to have to do this
$passhash = $username . $password
and use MD5
-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 3:29 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
LIGHT just came on!!! Why does ittake so long.
MD5(andrew.madonna) - I think you're goint to have to do this
$passhash = $username
try :
$arg = select password, 1 as auth from acl where (username='andrewd') and
password=MD5(concat(username,password));
HTH
Andrey
- Original Message -
From: Necro [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 6:29 PM
Subject: RE: [PHP-DB] MySQL Result
Addressed to: Necro [EMAIL PROTECTED]
[EMAIL PROTECTED]
** Reply to note from Necro [EMAIL PROTECTED] Fri, 11 Jan 2002 03:41:43 +1100
select password, 1 as auth from acl where (username='andrewd' and
password=(163e06103a371fd95b21b4a849bb4b91))1064 : You have an error in your
username='andrewd' and password =
'PASSWORD(madonna)'Resource id #2
Any ideas?
Andrew
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 8:56 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Addressed to: Necro
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 8:56 AM
To: Necro; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Addressed to: Necro [EMAIL PROTECTED]
[EMAIL PROTECTED]
** Reply to note from Necro [EMAIL PROTECTED] Fri, 11 Jan 2002
03
either.
Andrew
-Original Message-
From: Daniel Barton [mailto:[EMAIL PROTECTED]]
Sent: Friday, 11 January 2002 2:40 PM
To: Necro
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL Result Resource
Andrew:
Don't put quotes around your MySQL function call.
i.e.
PASSWORD($password
]]
Sent: Friday, 11 January 2002 3:30 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Result Resource
Daniel,
I had tried both with and without quotes. Neither work.
Without quotes I get:
select password, 1 as auth from acl where username='andrewd' and password =
PASSWORD(madonna)1054
On Friday 11 January 2002 10:33, Necro wrote:
Ok,
I have tried to go to PASSWORD after none of the suggestions worked out.
The current statement is:
$arg = select password, 1 as auth from acl where username='$username' and
password = 'PASSWORD($password)';
But the error I get now
Hello,
Clear - coding has 16 characters - you have defined usrpassword in the
second DB for 15 - probably one character is missing with coding.
I am rather sure it is the problem, if not - sorry to disturb you
Regards,
Petr.
-Original Message-
From: Matthew Tedder [mailto:[EMAIL
Hi there,
I format my results using the following code:
?
// format results by row
while ($row = mysql_fetch_array($sql_result)) {
$title = $row[title];
$desc = $row[description];
$image = $row[image];
$url = index3.php?image=.($row[image]);
?
a href=?=$url??=$PHPSESSID?img
which one was giving you the problem? the first or second mysql try. if it
was the second, try wrapping the $cattyname with single quotes like this
Minor_Category = '$cattyname'. if the $cattyname var has anything but
numbers, the statement won't work.
Jim
- Original Message -
From:
nautilis,
Leave the date in the database in MySQL format (/MM/DD) and when you
need to display the date on your page, just do this:
?php
explode(/, $datearray);
$date = $datearray[2].'/'.$datearray[1].'/'.$datearray[0];
?
That just splits up the three numbers, and rearranges them. Easy
]
Cc: 'nautilis'
Subject: RE: [PHP-DB] MySQL date formats
nautilis,
Leave the date in the database in MySQL format (/MM/DD) and when you
need to display the date on your page, just do this:
?php
explode(/, $datearray);
$date = $datearray[2].'/'.$datearray[1].'/'.$datearray
Try in PHP. This should take 12/25/2001 in $input_date and convert it to
20011225 in $db_date. Then write $db_date to mySQL database.
Perform similar conversion when extracting from database.
Or instruct your users to use MMDD.
$thedate = explode(/,$input_date); //$thedate[0]=DD,
A sample of what you were trying would have been helpful...
If I understood your problem right, the solution is a piece of code like this:
?
echo(table\ntr\n);
while ($myrow=mysql_fetch_row($result))
{
$colcount++;
if ($colcount==$desiredcolcount)
{
$colcount=0;
}
of the same data. Its like it is doing each
query three times or something.
Don't know why it is doing that.
- Shannon
-Original Message-
From: Jim Lucas [mailto:[EMAIL PROTECTED]]
Sent: Friday, 21 December 2001 03:52 AM
To: Shannon Doyle; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Mysql
ORDER BY field DESC
At 07:27 AM 12/19/2001, Brian Grayless wrote:
How you do a reverse order by in SQL, kind of like ORDER BY field only
reverse the order???
Sliante,
Richard S. Crawford
http://www.mossroot.com
AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
MSN: [EMAIL PROTECTED]
It is only
It's not the IN, it's the sub-query you cannot use. MySQL doesn't support
them and it's just about the main reason I don't like it.
Alternatives? You could execute your subquery and return the results to an
array. Loop through the array, using the index and the indexed element to
drive a
Is there a way to rollback a 'delete from table;' command in MySQL
3.23.36-1? Yes I did it... I pressed enter instead of backspace.
Did I lost my table content? I have no backup of this especific database.
PS: I didn't close the connection with the database yet.
Thank for any help, even
Pereti [EMAIL PROTECTED]; PHP-DB
[EMAIL PROTECTED]
Sent: Thursday, December 06, 2001 8:41 AM
Subject: Re: [PHP-DB] MySQL table recovery.
Is there a way to rollback a 'delete from table;' command in MySQL
3.23.36-1? Yes I did it... I pressed enter instead of backspace.
Did I lost my table
Hi,
Check if your MySQL server is working properly - this error usually appears when the
MySQL server is down.
The other thing is to check whether the socket the MySQL server uses is
/tmp/mysql.sock and if it is not modify the php
configuration variable MYSQL_SOCKET
Hope this helps
Dobromir
You have the wrong list.
http://www.mysql.com/documentation/lists.html
-Original Message-
From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 2:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Restarting A LOT
Okay, this is beginning to bug. I
-Original Message-
From: Matthew Loff [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 1:18 PM
To: 'Jonathan Hilgeman'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] MySQL Restarting A LOT
You have the wrong list.
http://www.mysql.com/documentation/lists.html
-Original Message-
From
There is a setting when you launch MySQL to tell it how many connections
it will accept. Read the following to get a better idea on this:
http://www.mysql.com/doc/T/o/Too_many_connections.html
The default number of connections to MySQL is 100, but can be set much
higher if necessary. You
Many thanks, I'll let you know how it works out.
Best,
Lynn
--
Lynn Siprelle, Siprelle Associates: Web Publishing
Chief Assoc. Josephine b. 9/9/97 * New Assoc. Louisa b. 4/25/01
Business: lynn@siprelle com | Personal: [EMAIL PROTECTED]
The New Homemaker: http://www.newhomemaker.com/
--
PHP
2 things:
mysql_query($QueryInsert);
print mysql_error();
Should read:
$query = mysql_query($QueryInsert) or die(mysql_error());
and:
It returns Can't get stat of '/www/publico2/tableData0TMRRy' (Errcode: 13).
what exactly is: tableData0TMRRy?? if it should be a file, it should be
Petr Tuma wrote:
What error message it produce?
Ok, table titles is composed of:
+--+-++
| titlesid | releaseyear | title |
+--+-++
mysql select *,(case when title like 'The %' then substring (title, 5, 255)
Message-
From: Ian Evans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 01, 2001 9:20 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL: Alphabetizing title results in library
format
Petr Tuma wrote:
What error message it produce?
Ok, table titles is composed
Cami wrote:
Try this:
mysql select *,(case when title like '%The%' then substring (title, 5, 255)
when title like '%A%' then substring (title, 3, 255) when title like '%An%'
then substring (title, 4, 255) else title end) as sort_col from titles order
by sort_col;
Argh, that still produces
what the manual say.
Cami
-Original Message-
From: Ian Evans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 01, 2001 9:20 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MySQL: Alphabetizing title results in library
format
Petr Tuma wrote:
What error message it produce?
Ok, table
Hi,
seems a bit strange.
Try this select (use mysql client)
mysql select title,if(title like 'The %','yes','no') from titles;
if it works try substring functions and if that works try 'order by' clause.
It's at least working on server v. 3.23, so in case it will not work find out
in the 'list
Petr Tuma wrote:
select *,(case when Title like 'The %' then substring (Title, 5, 255)
ETC.
Alas, MySQL doesn't like that syntax either. :(
--
Ian Evans
Digital Hit Entertainment - News and Information
http://www.digitalhit.com
--
PHP Database Mailing List (http://www.php.net/)
To
I have a problem here which I can not find an answer.
My date fields (EmailD in this case) can be in four different formats:
a) dd.mm.
b) d.mm.
c) dd.m.
d) d.m.
So this is what I've tried to do to convert the dates to -mm-dd
format:
INSERT INTO feCompsT (ID, Company,
701 - 800 of 916 matches
Mail list logo