Jump to content

2 part question: Select statement or PHP echo


veriax

Recommended Posts

Hello, 

 

This is my first post on this forum, so please bear with me if it's in the wrong place or anything. 

 

I'm not sure if my question can be solved by php or if its an SQL thing. I'm also quite new to all this and still learning..

 

Case is this:

I have a table called "texts". Some of the rows have variances like in the field "level" (1 or 2). 

What I want to do is to create a recordset inside Dreamweaver  and to be able to drag and drop the different fields into the page, so that it echoes $recordset level1 and another for level2. Is this even possible to do with PHP?

Also: 
Is it possible to make an SQL statement to do this? 

 

This works: 

"select text as item1 from texts where profile_id = 1 and level = 1"

 

But what i really want to do (aware that this is not a working code), is: 

select text as item1 from texts where profile_id = 1 and level = 1

select text as item2 from texts where profile_id = 1 and level = 2
select text as aboutme from texts where profile_id = 1 and about_me = 1
 
Any advice would be highly appreciated :)
Thanks! 
Link to comment
Share on other sites

I don't think you'll find much help here if you're looking for a point-and-click way to develop a PHP application. Frankly the idea of developers working that way terrifies me.

You're more likely to get help if you can actually work with the PHP code itself. Like, you can post what you have here and we can make suggestions on what to do and you can go into the code and manually make the changes.

 

Is it possible to make an SQL statement to do this?

Yes, but I have no idea what you're trying to actually accomplish. What are these queries supposed to help you do? How would you use them?

 

And I don't know if I want the answer to this, but I'll ask anyways:

select text as aboutme from texts where profile_id = 1 and about_me = 1
1. I assume profile_id=1 means "this table has text for lots of different profiles, and in this case I want the text for profile #1". Is that right?

2. What does the about_me column represent?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.