
bubblegum.anarchy
-
Posts
526 -
Joined
-
Last visited
Never
Posts posted by bubblegum.anarchy
-
-
how so?
-
change
WHERE NOT EXISTS
to
WHERE EMPLOYEE_NO NOT IN
-
Probably not.
-
change DEFAULT '""' to DEFAULT NULL or DEFAULT ''
-
SELECT * FROM table_name WHERE cast(column_name AS CHAR) LIKE 'search_term'
-
Have you tried the Installation and Configuration Forum: http://www.phpfreaks.com/forums/index.php/board,63.0.html ?
-
What does your version of player_name_result() return? - keep in mind that my version returned a result id used with mysql_fetch_assoc() and not an array.
-
This following query might help guide you in the right direction:
SELECT user_name , user_birthday , CURRENT_DATE , IF (date_format(user_birthday, concat(year(CURRENT_DATE), '-%m-%d')) >= CURRENT_DATE , date_format(user_birthday, concat(year(CURRENT_DATE), '-%m-%d')) , date_format(user_birthday, concat(year(CURRENT_DATE + INTERVAL 1 YEAR), '-%m-%d'))) AS next_birthday FROM wowbb_users ORDER BY next_birthday
The above query lists all the user names, the current date and the users upcoming birthday date, there is just a matter of adding an appropriate WHERE clause to limit the records where the next_birthday is within a week.
-
There could be some issue with your account record... have your friend pass on the website contact details and get in touch with them - provide as much detail as possible, as in your computer and browser, and of course the error message.
-
Where does it read the year in the profile code?
Do you want the get_birthdays() function to return a list of stored birthdays irrespective of the birthday year?
-
Have you re-checked the website... the issue may have been since resolved and the reason your friend has no problems with the website.
-
There is nothing you can personally do to resolve the websites error but information the proprietor of the website.
-
Right now it looks for todays birthdays +7 days.
And what do you want?
-
SELECT groups.id, groups.name, count(members.id) AS member_count FROM groups LEFT JOIN members ON groups.id = members.group_id GROUP BY groups.id ORDER BY member_count DESC
-
Consider creating a global function to grab the result set, that is accessible to the entire website (or where applicable):
function player_name_result() { static $result; if (!isset($result)) { mysql_query($query = " SELECT * FROM appearances ORDER BY team_id") or trigger_error(mysql_error()."<PRE>".$query."</PRE>", E_USER_ERROR); } return $result; }
The above query would obviously have to be more appropriate... then the function can be called from within the html like this:
<SELECT class="MyClass" id="player_one" name="player_one" <OPTION value="0">Select Player</OPTION> <? while ($record = mysql_fetch_assoc(player_name_result())):?> <OPTION value="<?=$record['player_one'];?>"<? if ($record['player_one'] == $selected['player_one']):?> selected<? endif;?>></OPTION><? endwhile;?> </SELECT>
The above syntax has not been validated.
-
Read the following page: http://www.ss64.com/bash/crontab.html
-
$query = "SELECT DISTINCT `pet_id`, COUNT(`pet_id`) AS amount FROM `read2` GROUP BY `pet_id` AND ORDER BY `pet_id` ASC";
-
Triggers in MySQL version >= 5.0 : http://dev.mysql.com/doc/refman/5.0/en/triggers.html
Triggers can insert a clone record.
-
Use mysql_real_escape_string() and then quote your variables before database insertion so that the final insert string looks more like this:
UPDATE pages SET page_description='A great homepage for anyone living in Australia\'s Blue Mountains',page_keywords='search engine blue mountains' WHERE page_id=1
-
oops - you would not... sorry... I was mixing regular expression and MySQL LIKE.
well... the issue would then be in the amount of time taken to create a joins to employee and employer tables.
The combined id method requires that the ids be extracted before joins are created where as keeping id seperate does not.
-
SELECT IF (version() >= 5.0, Stored Procedures and Functions, google)
-
Replace the AND with a comma, sort order direction can also be applied to each sorted column such as:
SELECT * FROM search ORDER BY topic DESC, name ASC
-
There would be an issue with searching against the employer ID since LIKE '%{$employer_ID}' would return more than expected.
Normally, linked tables are structured this way:
message.id
message.employer_id
message.employee_id
message.content
etc...
That is if employee to employee or employer to employer messages are not allowed, otherwise:
message.id
message.author_id
message.recipient.id
message.content
etc...
-
My money is on a wayward quote....
... mysql_real_escape_string()
home, host university link problem
in MySQL Help
Posted
Read this: http://dev.mysql.com/doc/refman/4.1/en/join.html
and then
Read the ORDER BY information here: http://dev.mysql.com/doc/refman/4.1/en/select.html