PHP not returning any data after SQL query

I just installed Drupal for the first time today, though I'm familiar with Wordpress. I'm relatively new to PHP and SQL queries, so I'm sure I'm doing something dumb, but after almost 5 hours of searching and trying different things, I can't seem to figure this stupid thing out.

Initially, I just wanted to query my database and pull out a specific value from a table then run an IF/THEN check against it. I couldn't get that to work, so I eventually dumbed it down to the most simple code I could possibly find. I am pasting the following code into a recently created 'basic page' node with PHP Code format selected:

$results = db_query("SELECT nid, title FROM {node}");

Hello, world

From what I've read, that code should just return the node ID and node Title from each row in the {node} database, followed by Hello, world. When I run that code, the only thing I'm seeing is Hello, world -- nothing is returned from the PHP code.

I've tried changing it to:

$results = db_query("SELECT nid, title FROM {node}");
echo $results;

But that breaks the page and returns 'The website recovered from an unexpected error, please try again later.'

$results = "PRINT RESULTS, DAMMIT!"
echo $results;

Weird Cache Issue - Help!

I noticed that when I enable 'Aggregate CSS/JS,' my site's theme breaks in Internet Explorer (all versions). I did some troubleshooting and tried downloading the cached CSS files from IE. When they opened in Dreamweaver, I realized that the text was garbled and was showing non-latin characters in place of the CSS.

The site works well in Firefox and Chrome, but it seems IE is interpreting the CSS and JS differently I guess.

Drupal 7 exporting a custom profile to features

I've created some new fields for users who register in admin/config/people/profile since we are still building the site I want to port these out to a features module but am completely unable to figure out how to do this? I thought it would be some thing like Features >> [Create Feature] [Edit components] >> Variables but cannot find my custom fields?

I named my new form Registration, and tried view sourcing and flipping through the source with the find command but am unable to find it there either. Anyone know what it might be called or under?

how can i make a taxonomy tags browser view?

when tried to open a view for a specific vocabulary, i got the terms duplicating themselfes. for example, if i have 6 pages with the "CATS" tag, then this Terms-view will show something like this:

DOGS, TURTLES, TURTLES, CATS, CATS, CATS, CATS, CATS, CATS.

instead of showing: dogs, turtles, cats (the desired mode).

---
what i did was to open a view, and give it the field of my vocabulary (actually it is the single option with the vocabulary's name...)

tried everything i knew i should try to get this done.. please help.

How can administrator provide access to his book for one user only.

Administrator has designed a book and wishes to give access to child pages to just one user only.

patch.exe problems

Hello,

I'm trying to use this patch to allow me to use the Flat Book module for Drupal 7. This is my first time using a patch, so I think I'm not doing it right.
I've downloaded a program from here to install the patch to the Flat Book module in Windows. I put both the module and patch in C:\Program Files\GnuWin32\bin and enter into the command line:

patch.exe < upgradeToD7-1097288-2.patch

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x