PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > mailing.database.mysql > Syntax for select statement returning output?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Syntax for select statement returning output?

Réponse
 
LinkBack Outils de la discussion
Vieux 06/06/2006, 13h50   #1
luvic.vangool@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Syntax for select statement returning output?

Hi,

I'm fairly new to MySql and come from a MS SQL background.
I have an application that I am converting from MS SQL to MySql.

I need to return a value from MySql using a parameter.

In MS SQL my select statement is:
"select @id = id from database"

That doesn't seem to be working with MySql... does anyone have any
suggestions?

Many thanks for your !

Luvic.

  Réponse avec citation
Vieux 15/06/2006, 11h54   #2
Bart Van der Donck
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Syntax for select statement returning output?

luvic.vangool@gmail.com wrote:

> I'm fairly new to MySql and come from a MS SQL background.
> I have an application that I am converting from MS SQL to MySql.
>
> I need to return a value from MySql using a parameter.
>
> In MS SQL my select statement is:
> "select @id = id from database"
>
> That doesn't seem to be working with MySql... does anyone have any
> suggestions?


You can't select something from a database in MySQL, but only from a
table.

In order to use your SQL statement, you would first need to choose the
database you wish to work with on the MySQL server, and then execute
something like this:

SELECT id FROM sometable;

The MySQL manual is at http://dev.mysql.com/doc/.

Hope this s,

--
Bart

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h08.


Édité par : vBulletin® version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07112 seconds with 10 queries