Toon posts:

[MYSQL] eerste karacter van een veld.

Pagina: 1
Acties:
  • 49 views sinds 30-01-2008

Verwijderd

Topicstarter
Hoe kan ik in 1 query het eerste karakter van een veld result ophalen zonder php te gebruiken.
Bv.
$query = "SELECT ? FROM table"

inhoud van de tabel
a_1
b_2
c_3

Als resultaat moet ik terug krijgen a,b,c.
het zelfde idee als substr($result,0,1);

  • ludo
  • Registratie: Oktober 2000
  • Laatst online: 01-03 18:17
SUBSTRING :z

www.mysql.com

[ Voor 53% gewijzigd door ludo op 30-06-2004 12:51 ]


  • guanpedro
  • Registratie: Maart 2002
  • Laatst online: 18-12-2025

guanpedro

Live forever or die trying

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

Substring

Google op substr en mysql en je vindt het meteen...

PC: MSI-NEO2FISR P4-2.6HT@2.8 Dual-channel GEIL-PC3500 Intel CSA GB-LAN 9600PRO Pioneer DVR106 Server: Dual Xeon-2GHz 3Ware 7500-12 11x120GB RAID5 GB-LAN RH 9 2.4.22 Digicam: Sony DSC-F717


  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

what they said ^^ Manual werk.

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


Dit topic is gesloten.