Search Results

Showing results 1 to 14 of 14
Search took 0.01 seconds.
Search: Posts Made By: dickersonka ; Forum: PHP and child forums
Forum: PHP Nov 13th, 2008
Replies: 11
Views: 3,122
Posted By dickersonka
it is giving you the highest id in that table, when you do the insert use


select LAST_INSERT_ID();


this will give you the id of that row, not the highest one in the table
Forum: PHP Nov 13th, 2008
Replies: 11
Views: 3,122
Posted By dickersonka
you can do it that way, i would suggest returning a value from a stored procedure like


select LAST_INSERT_ID();
Forum: PHP Oct 29th, 2008
Replies: 2
Views: 399
Posted By dickersonka
And just as good practice, a database is there for the organization, it doesn't need to be in sequential order.

It may look prettier to you if it is, but just add an order by user_id or whatever...
Forum: PHP Oct 29th, 2008
Replies: 2
Views: 399
Posted By dickersonka
i don't have a clear idea of what you are wanting

the message_from field has a 3 and it needs to be a 104?
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,058
Posted By dickersonka
That is the point of the query, you are able to distinguish in the same resultset of who are chaplains and not. You want to use the same column and distinguish code side by checking user_level.
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,058
Posted By dickersonka
thats because you are assigning it, the is_chaplain column didn't exist and we had to give it values, the user level column does exist

use this in both queries and you will get your 2 or 3

...
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,058
Posted By dickersonka
yes, i thought you meant you didn't have a way to distinguish

instead of the is_chaplain, substitute the user_level into the query
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,058
Posted By dickersonka
i think we need to add single quotes around the is_chaplain


//readers
0 as 'is_chaplain'

//chaplains
1 as 'is_chaplain'
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,058
Posted By dickersonka
SELECT assignment.Id, assignment.Candidate, assignment.`Section`, assignment.Team, assignment.Chaplain, assignment.Reader, tbl_user.Id, CONCAT_WS(' ', `tbl_user`.name_pre, `tbl_user`.name_first,...
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,058
Posted By dickersonka
If you need the results separated, then why not issue 2 queries?

Or add an additional column to the rows for the union,
for readers 0 as IS_CHAPLAIN
for chaplains 1 as IS_CHAPLAIN
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,058
Posted By dickersonka
i don't get what the difference is in the concat of the chaplain, you are using the same columns

can you show what the concat difference is?
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,058
Posted By dickersonka
f_name field is just pre + first + last + suffix

it will use the same formatting for both readers and chaplains

if you want this field different, please explain more clearly with an example of...
Forum: PHP Oct 28th, 2008
Replies: 18
Views: 1,058
Posted By dickersonka
WHERE tbl_user.Id= assignment.Reader OR tbl_user.Id = assignment.Chaplain


i think this is what you are looking for with the additional where
Forum: PHP Aug 25th, 2008
Replies: 4
Solved: a href
Views: 562
Posted By dickersonka
A good way would be to include the parameters in the query string



<a href="www.thispage.com?county=Chaffee&state=Colorado"> Chaffee </a>
Showing results 1 to 14 of 14

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC