Skip to main content
1 of 3
MauF
  • 495
  • 1
  • 3
  • 12

Using wildcards in custom module outputting sql query

It has become obvious to me that SQL syntax is a little differnet within drupal.

After some fiddling around I am getting the hang of it, but I haven't been able to use wildcards succesfully.

$sql = '

SELECT name Nombre, mail Email FROM users WHERE status = 1 AND mail LIKE ('%@hotmail%') LIMIT 25

';

Any suggestions, please? I haven't been able to find (or I might be looking in the wrong places) for Drupal documentation regarding wildcards within $page_content in a .module file.

Thanx in advance.

MauF
  • 495
  • 1
  • 3
  • 12