Community Member
Member Avatar
Bob Hensley 20 Replied To a Post in Formatting Dates
Topic by Magic8Computing in Community Center
The example at Rproffitt's link is on the right track. You'll want to reference [PHP's Date/Time Supported Date & Time Formats list](http://php.net/manual/en/datetime.formats.date.php) to ensure MySQL's *CURDATE()* function returns a date formatted in a manner that works.

Thankfully *CURDATE()*'s standard output is YYYY-MM-DD is an OK format to work with.

$format … Reply by Bob Hensley
Member Avatar
Bob Hensley 20 Began Watching Formatting Dates
How do i formatt the dates do the come out as DD/MM/YYYY please



<?php

$convar = mysqli_connect("localhost","root","","ffp_calendar");

if(mysqli_connect_errno())
{
echo "Error occured while connecting with the database ".mysqli_connect_errno();
}

$sqlvar = "SELECT * FROM `calendar` WHERE `CurrentDate` = curdate()";

$resultvar = mysqli_query($convar, $sqlvar) or die("Bad Query: $sql");

while($rowvar = mysqli_fetch_assoc($resultvar)) … Topic by Magic8Computing in Community Center
Member Avatar
I have a table that will have several fields, such as counties, age_groups, gender, sports, etc..
on countries I will be storing data with this format["US","CA","DK","FI","RU","SE"]
on age groups I will be storing data with this format["2000","1999","1998"]
on age groups I will be storing data with this format["M","F"]
on age … Topic by extjac in Databases
Member Avatar
Topic by extjac in Databases
Typically speaking, it is very bad practice to store serialized (or JSON) data in a database. This is big, red flag that you are not normalizing your database. Thus you're going to have dependencies all over the place, and it will make maintaining your data an absolute nightmare.

Could you … Reply by Bob Hensley
Member Avatar
Bob Hensley 20 Replied To a Post in Undefined Element ?
Topic by Siberian in Web Development
> document.getElementById("five").style.width="800px"+backgroundColor="black";
> Sorry, how do you chain css styles in Js, concatenating with plus(+) doesn't work ?

You can't chain by accessing the CSS properties via the *style* object. You either need to modify them seperately, or all at once via cssText.

// Separately
elem.style.width = '800px';
elem.style.backgroundColor = … Reply by Bob Hensley
Member Avatar
file.php?sub=3&main=10&date=2010-04-20
sub value has max 3 and main has max 10 , can anybody tell me how many tables or columns this website has ? Topic by junaid_5 in Web Development
Member Avatar
Topic by junaid_5 in Web Development
> file.php?sub=3&main=10&date=2010-04-20
> sub value has max 3 and main has max 10 , can anybody tell me how many tables or columns this website has ?

Even if this information is readily available in the query string, why is it important to you? Reply by Bob Hensley
Member Avatar
Bob Hensley 20 Replied To a Post in Undefined Element ?
Topic by Siberian in Web Development
> I know, I fouled up. Food poisoning along a minor cold will cause this because of one cup of Hot Cocoa.
> I wanted to overwrite the css.width with the with in the javascript, I've noticed this is not possible ?

You just want to set the element's width … Reply by Bob Hensley
Member Avatar
Hi,

I'M using the simple grid theme and I want to add a LinkedIn social media button on the top right that linkS to my LinkedIn profile. Most of the other main networks are built in to the theme So that you only have to add a link to your … Topic by ecleary in UI / UX Design
Member Avatar
Bob Hensley 20 Replied To a Post in LinkedIn icon for Simple Grid Theme
Topic by ecleary in UI / UX Design
The directory containing the other images:

[BLOG-ROOT]/wp-content/themes/simplegridtheme/images/
http://www.manwithavandublin.ie/wp-content/themes/simplegridtheme/images/

You're going to need to modify your own image though, I'm afraid. [LinkedIn provides their logo](http://press.linkedin.com/logo-images) in numerous formats, just for this kind of situation. But you'll need to resize and greyscale it, to make it fit in per your theme. Reply by Bob Hensley
Member Avatar
Topic by Wisnu_1 in Software Development
> Hello Bob, I study in a terrible college in Indonesia, they are collaborating with other college abroad, and these assignment came from them, but my local lecturer is clueless and doesn't know what he's teaching. that's why I'm asking it here, because I believe people in this website has … Reply by Bob Hensley
Member Avatar
# MySQL Stored Routines: Another Useful Scenario #

[In a past guide](http://blog.bobbyhensley.com/sql-procedures-functions-authentication-example/) I discussed MySQL stored routines within MySQL. Now I’m back with another guide on MySQL stored routines. And this time it’s a more concrete case; one that you may run into yourself in the future (or maybe you … Topic by Bob Hensley in Databases
Member Avatar
Featured Bob Hensley 20 Began Watching Tutorial Stored Routines: Word Filtering Inside the Database
# MySQL Stored Routines: Another Useful Scenario #

[In a past guide](http://blog.bobbyhensley.com/sql-procedures-functions-authentication-example/) I discussed MySQL stored routines within MySQL. Now I’m back with another guide on MySQL stored routines. And this time it’s a more concrete case; one that you may run into yourself in the future (or maybe you … Topic by Bob Hensley in Databases
Member Avatar
Bob Hensley 20 Began Watching MySQL Update Query
Hey there. I'm building a project in PHP/MySQL and it is a sort of [FaceMash](http://en.wikipedia.org/wiki/History_of_Facebook#Facemash) project. I am able to call the images (with image name and points) from the database. I have managed to use the MySQL Update query in order to increase the points that each image gets … Topic by adamchippy in Web Development
Member Avatar
Bob Hensley 20 Replied To a Post in MySQL Update Query
Topic by adamchippy in Web Development
Where are you defining the $row variable? And what is it defined as? Also, what data type is the *row* attribute in the table Reply by Bob Hensley
Member Avatar
Hello, I've got an assignment where I'm told to create a chat room application. I have already created the application using Java. But I am also asked to research at least three different technologies to implement chat room application, but I only know one... that is using Java Sockets.
Is … Topic by Wisnu_1 in Software Development
Member Avatar
Topic by Wisnu_1 in Software Development
> Hello, I've got an assignment where I'm told to create a chat room application. I have already created the application using Java. But I am also asked to research at least three different technologies to implement chat room application, but I only know one... that is using Java Sockets. … Reply by Bob Hensley
Member Avatar
Bob Hensley 20 Began Watching SEO
i want to leanr SEO audit..plzz help me Topic by ahmedzahir in Digital Marketing
Member Avatar
Bob Hensley 20 Replied To a Post in SEO
Topic by ahmedzahir in Digital Marketing
> i want to leanr SEO audit..plzz help me

Can you expand on that, please? Do you want us to perform an SEO audit? Or are you trying to, as I'm assuming is the case, learn how to perform SEO audits yourself? And if that's the case, are you familiar … Reply by Bob Hensley
Member Avatar
Bob Hensley 20 Replied To a Post in Undefined Element ?
Topic by Siberian in Web Development
> This code look right to you ? It's not changing my background color to blue :(

JorgeM has provided you with the appropriate code. But to explain the situation:

You have, once again, forgotten to use the method on a DOM element. What are you searching through? You're searching … Reply by Bob Hensley
Member Avatar
Bob Hensley 20 Replied To a Post in Undefined Element ?
Topic by Siberian in Web Development
> It's the same method if instead of getting a class you got an id then you get the variable, and add the css rules, correct ?

You can search by ID as well. A nonsense example:


// can only return one, so no need for array index
var elem … Reply by Bob Hensley
Member Avatar
Featured Bob Hensley 20 Began Watching Include file question
I have been trying to work around a problem but am not having much luck.
I have classes that include a file with my db settings. The problem is I have a functions directory that calls some of the classes. I get failed to open stream: No such file or … Topic by ProfessorPC in Web Development
Member Avatar
Featured Bob Hensley 20 Replied To a Post in Include file question
Topic by ProfessorPC in Web Development
>
> I found it.
> include($_SERVER["DOCUMENT_ROOT"]."/filepath";

I'd just like to point out that there's a syntax error here: you omitted the terminating parenthesis. I would also recommend, if this file is critical to your application, you use the *require_once()* function instead. Reply by Bob Hensley
Member Avatar
Bob Hensley 20 Began Watching Facebook is useful or not?
Facebook is useful or not?

Regards Topic by robert_14 in Digital Marketing
Member Avatar
Bob Hensley 20 Replied To a Post in Facebook is useful or not?
Topic by robert_14 in Digital Marketing
> Facebook is useful or not?
>
> Regards

In what context? General usage? As a marketing platform? For sales? Reply by Bob Hensley
Member Avatar
hi
i want to make a form with html but i want get that information in a local database like access db or sql db in my pc.
how can i do it? plz help me with code or info about that.
tanx alot guys Topic by ali.win in UI / UX Design
Member Avatar
Topic by ali.win in UI / UX Design
> hi
> i want to make a form with html but i want get that information in a local database like access db or sql db in my pc.
> how can i do it? plz help me with code or info about that.
> tanx alot guys

You're … Reply by Bob Hensley
Member Avatar
Bob Hensley 20 Replied To a Post in Undefined Element ?
Topic by Siberian in Web Development
> But what is the correct answer?

Check my last post for a code example. As I explained, *getElementsByClassName()* is a function of all DOM elements. If you wish to learn more then I would encourage you to check out [the MDN documentation on this function](https://developer.mozilla.org/en-US/docs/Web/API/document.getElementsByClassName). Reply by Bob Hensley
Member Avatar
Featured Bob Hensley 20 Began Watching Anyone in for homeopathy?
I'm not.
My idea is: if you want to stop a tsunami(a disease) you have to build a strong, huge concrete wall(a medication), a pebble(a dilution of a dilution?) will have little effect. Topic by ddanbe in Community Center
Member Avatar
Featured Bob Hensley 20 Replied To a Post in Anyone in for homeopathy?
Topic by ddanbe in Community Center
> I'm not.
> My idea is: if you want to stop a tsunami(a disease) you have to build a strong, huge concrete wall(a medication), a pebble(a dilution of a dilution?) will have little effect.

I don't believe homeopathy has a place in modern medicine. When you're sick enough that … Reply by Bob Hensley