$sql = SELECT count(Email) as numEmails, Email FROM mena_guests WHERE
Voted='yes' GROUP BY Email ORDER BY numEmails DESC LIMIT $startingID,
$items_numbers_list;
--
itoctopus - http://www.itoctopus.com
Me2resh Lists [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
hi
i need help
$sql = SELECT count(Email) as numEmails, Email FROM mena_guests WHERE
Voted='yes' GROUP BY Email ORDER BY numEmails DESC LIMIT $startingID,
$items_numbers_list;
I answered this morning, I don't know why it got deleted
--
itoctopus - http://www.itoctopus.com
Me2resh Lists [EMAIL PROTECTED] wrote
On Tue, May 2, 2006 7:05 am, Ross wrote:
This is my database now...I will use the item_id for the order but
what if I
want to change item_id 3 to item id 1? How can I push all the items
down one
place? How can I delete any gaps when items are deleted.
Change item_id 3 to 1.
... select id
On Tue, May 2, 2006 7:22 am, chris smith wrote:
On 5/2/06, Ross [EMAIL PROTECTED] wrote:
This is my database now...I will use the item_id for the order but
what if I
want to change item_id 3 to item id 1? How can I push all the items
down one
place? How can I delete any gaps when items are
On 5/3/06, Richard Lynch [EMAIL PROTECTED] wrote:
On Tue, May 2, 2006 7:22 am, chris smith wrote:
On 5/2/06, Ross [EMAIL PROTECTED] wrote:
This is my database now...I will use the item_id for the order but
what if I
want to change item_id 3 to item id 1? How can I push all the items
down
Ross schrieb:
Just say I have a db
CREATE TABLE `mytable` (
`id` int(4) NOT NULL auto_increment,
`fileName` varchar(50) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
when I add items they go id 1,2,3 etc. Whn I delete them gaps appear.
This is my database now...I will use the item_id for the order but what if I
want to change item_id 3 to item id 1? How can I push all the items down one
place? How can I delete any gaps when items are deleted.
CREATE TABLE `board_papers` (
`id` int(4) NOT NULL auto_increment,
`doc_date`
On 5/2/06, Ross [EMAIL PROTECTED] wrote:
This is my database now...I will use the item_id for the order but what if I
want to change item_id 3 to item id 1? How can I push all the items down one
place? How can I delete any gaps when items are deleted.
Why do you want to do that? There's no
This is my database now...I will use the item_id for the order but what if
I
want to change item_id 3 to item id 1? How can I push all the items down
one
place? How can I delete any gaps when items are deleted.
CREATE TABLE `board_papers` (
`id` int(4) NOT NULL auto_increment,
Exactly - I don't think you really understand how a relational database
works. The ids are retained as they may relate to records in another table.
Internal sorting order is of no relevance at the application level. I think
you need to rethink your design a little.
On 02/05/06, T.Lensselink
Ross wrote:
Hi all,
I am trying to create a table on the remote server but it never seems to
work
CREATE TABLE `sheet1` (
`id` int(10) NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`fname` varchar(255) NOT NULL default '',
`sname` varchar(255) default NULL,
[snip]
1064 - 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
'DEFAULT CHARSET=latin1 AUTO_INCREMENT=303' at line 18
and this is what the manual says (not very helpful)
a.. Error: 1064 SQLSTATE: 42000
Hi
Add records with this code.
?php
$name=isset($_POST['name']) ? $_POST['name'] :'';
$address=isset($_POST['address']) ? $_POST['address'] :'';
if (!empty($name)) {
mysql_connect($server,$user,$pass) or die (Error conecting);
mysql_select_db($dbnamn,$conection) or die (no db .$dbnamn);
$query =
Felipe,
I'm replying in spanish so you can understand better.
El problema que tienes es que la variable $nueva_base esta vacia. Si
deseas especificar el nombre con esa variable debes asignarle algun
valor antes de llamarla, si lo que quieres es crear una base de datos
que se llame nueva_base,
Networks, Inc.
(727) 723-8388
-Original Message-
From: Daniel Elenius [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 5:22 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL problem with RedHat 8
Yes, mysql.so is in /usr/lib/php4. The php.ini file has this in it:
[daniel
Make sure that the shared module is in the correct directory.
Check your php.ini file to make sure but it is most likely at /usr/lib/php4
make sure that you have mysql.so
- Original Message -
From: Daniel Elenius [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 14, 2003 3:58
Yes, mysql.so is in /usr/lib/php4. The php.ini file has this in it:
[daniel@p85 etc]$ grep mysql php.ini
;extension=php_mysql.dll
extension=mysql.so
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
; Default port number for mysql_connect(). If unset, mysql_connect()
Look into the logs, they should be more verbose. How did you install the
three.
BB wrote:
I seem to have a php-mysql problem on my new Sun Qube3 (RH Linux).
php works fine, mysql works fine, apache works fine, only the combination of
the three seems troublesome.
php does not recognize commands
INSERT INTO `contracts` (`key`, `content`) VALUES (1,'blah blah blah
character 39 is a single speach mark '+CHAR(39)+' blah blah blah')
That's because you are adding strings together, not concatenating them
(this isn't javascript!)
Use CONCAT() in MySQL to join strings together.
mysql
I understand about the concat function, but that doesn't really fit into my
scheme of things
I run all text for the web through a function SafeSQL so that values from
the web don't make SQL error or potential hacks occur.
All SafeSQL was doing (for mssql, access and just about any other db) was
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
Try this
$Query = "SELECT UCASE(Company) as company, Icons, ID, LogoD FROM
feComps";
List ( $company, $icons, etc ) = mysql_fetch_row( );
-Original Message-
From: Niklas Lampn [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:22 AM
To: Php-General
Subject:
Try this
$Query = "SELECT UCASE(Company) as company, Icons, ID, LogoD FROM
feComps";
List ( $company, $icons, etc ) = mysql_fetch_row( );
-Original Message-
From: Niklas Lampn [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 02, 2001 10:22 AM
To: Php-General
Subject:
SELECT UCASE(Company) AS Company works great, thanks!
Niklas
-Original Message-
From: Dimitris Kossikidis [mailto:[EMAIL PROTECTED]]
Sent: 2. marraskuuta 2001 11:11
To: 'Niklas Lamp¨¦n'
Cc: PHP General
Subject: RE: [PHP] mySQL problem
Try this
$Query = SELECT UCASE(Company
The issue here is that you aren't getting an index of Company from that
query. It is probably stored under the index of UCASE(Company). Try:
$Query = SELECT UCASE(Company) as ucCompany, Icons, ID,...;
Then the ucCompany field will contain your capitalized company data.
Jon
-Original
On 04-Jul-01 Simon Kimber wrote:
Hi All,
Does anyone know if this can be done with one query?
I have to create a chart based on info in two tables that are four tables
apart.
Here are the relevant tables and just the most relevant fields...
accident_report
- ID
- weekending
Sorry!!! I'm stupid! I forgot to mention that the list of causes has to be
for a specified accident_report.weekending
Cheers
Simon
-Original Message-
From: Don Read [mailto:[EMAIL PROTECTED]]
Sent: 04 July 2001 23:21
To: Simon Kimber
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP
Generally spoken, echo the SQL-Statement, and paste it in your local MySql
Client (e.g. MySql-Font). These Frontends give you a better error, and
you´ll find the problem in seconds. (hope so)
Peter Houchin [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
some code would be nice to have a look at :)
Other than that, check table names, database names, also your result lines, I've found
i get that error by not calling a result or calling the incorrect table/database
Peter
-Original Message-
From: Brian Rue [mailto:[EMAIL
Here's all the code that uses MySQL...
$db = mysql_connect(localhost,user,pass);
mysql_select_db(db,$db);
$gmdquery=SELECT * FROM game_of_the_day;
$the_info = mysql_query($gmdquery,$db);
while ($myrow = mysql_fetch_row($the_info)) {
(get info from the result)
}
... (decide
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 12:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL problem...
Here's all the code that uses MySQL...
$db = mysql_connect(localhost,user,pass);
mysql_select_db(db,$db);
$gmdquery=SELECT * FROM game_of_the_day;
$the_info = mysql_query
At 01:58 PM 3/10/01 -0500, John Vanderbeck wrote:
You are using in your statement ... should be "AND"
.
The following code is giving an me problems, I can't figure it out to save
my soul. The last line gives:
Here is the code:
$link = db_connect();
$query = "UPDATE Users SET
At 19:58 10.03.2001, John Vanderbeck said:
[snip]
$query = "UPDATE Users SET firstname='$firstname', lastname='$lastname'
WHERE username='$user' password='$password'";
[snip]
Try "AND" instead of "", this should
]]
Sent: Saturday, March 10, 2001 2:09 PM
To: PHP User Group
Subject: Re: [PHP] MySQL problem - stumped
At 01:58 PM 3/10/01 -0500, John Vanderbeck wrote:
You are using in your statement ... should be "AND"
.
The following code is giving an me problems, I can't figure it
out t
- Admin, GameDesign
-Original Message-
From: Rick St Jean [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 10, 2001 2:09 PM
To: PHP User Group
Subject: Re: [PHP] MySQL problem - stumped
At 01:58 PM 3/10/01 -0500, John Vanderbeck wrote:
You are using in your statement
The following code is giving an me problems, I can't figure it
out to save
my soul. The last line gives:
Here is the code:
$link = db_connect();
$query = "UPDATE Users SET firstname='$firstname', lastname='$lastname'
WHERE username='$user' password='$password'";
$result =
On Saturday 10 March 2001 19:58, you wrote:
The following code is giving an me problems, I can't figure it out to
save my soul. The last line gives:
Here is the code:
$link = db_connect();
$query = "UPDATE Users SET firstname='$firstname', lastname='$lastname'
WHERE username='$user'
with that
call.
- John Vanderbeck
- Admin, GameDesign
-Original Message-
From: Julian Wood [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 10, 2001 2:28 PM
To: John Vanderbeck; PHP User Group
Subject: Re: [PHP] MySQL problem - stumped
Well, PHP seems to think that $link is not working, so
..
Thanks again. Your a deadline saver :)
- John Vanderbeck
- Admin, GameDesign
-Original Message-
From: Christian Reiniger [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 10, 2001 2:32 PM
To: PHP User Group
Subject: Re: [PHP] MySQL problem - stumped
On Saturday 10 March 2001 19
On Tue, 20 Feb 2001 10:57, Josh G wrote:
Hi, sorry to post this here, but it's driving me crazy. On my local
machine, the following works no furys:
create table category (category_id integer primary key
auto_increment,name varchar(255) );
But on the production machine, I get:
ERROR 1064:
, and hangovers to... suffering.
- Original Message -
From: "David Robley" [EMAIL PROTECTED]
To: "Josh G" [EMAIL PROTECTED]; "PHP User Group"
[EMAIL PROTECTED]
Sent: Tuesday, February 20, 2001 11:41 AM
Subject: Re: [PHP] mysql problem
On Tue, 20 Feb 2001 10:57, Jos
Tuesday, February 20, 2001 11:42 AM
Subject: Re: [PHP] mysql problem
Nope, I've been using autoincrement on that box for a year or so.
It's not a copy/paste thing, cause I'm getting it when I type the lines
in by hand, too...
Gfunk - http://www.gfunk007.com/
I sense much bee
]]
Sent: Monday, February 19, 2001 17:00
To: PHP User Group
Subject: Re: [PHP] mysql problem
Ok, I've fixed the problem, it seems there's some major differences
between the linux / win32 ports of the client.
instead of
blah integer primary key auto_increment
which works on windows, I
I think if you echo the error (echo mysql_error();) you will see the exact
error you would get if connected directly to the db.
You can do something like:
$result = @mysql_query($sql_query); // hide any errors
If (!$result) {
echo "Error: " . Mysql_error() . "BR";
}
On 2/20/01 2:57 AM this
48 matches
Mail list logo