.INSERT General

Object Oriented Style Get Auto ID Of New Record Procedural Style Get Auto ID Of New Record The mysqli_insert_id() function returns the ID generated by a query on a table with a column having the AUTO_INCREMENT attribute. If the last query wasn’t an INSERT or UPDATE statement or if the modified table does not have a […]

Read More

Auto Index Row

Create as 'Int' and set to 'Auto Increment' Don't call the row Index as its a special MySQL word which you'll have to use in quotes if you do.

Read More

Images

<img border=”0″ src=”mypicture.png” width=”80″ height=”80″ alt=”SomeText” />

Read More

Duration

Convert Seconds To Duration Time Format $seconds_input = $video_duration; //The value in seconds (e.g. 1568.782) $hours = (int)(($minutes = (int)($seconds = (int)($milliseconds = (int)($seconds_input * 1000)) / 1000) / 60) / 60); $duration_string = $hours.’:’.($minutes%60).’:’.($seconds%60).((($milliseconds%1000) === 0) ? ” : ‘.’.rtrim($milliseconds%1000, ‘0’));

Read More

Creating Debug Output File

This will write / overwrite a file called test.txt in the local directory of the php file. You may need to create thr file first and enable write permissions for it to work. $data = “START-“.strftime(‘%c’).”-START”; $file = “test.txt”; $fp = fopen($file, “w”) or die(“Couldn’t open file for writing!”); fwrite($fp, $data) or die(“Couldn’t write values […]

Read More

Wrapping

Stopping Text Wrapping & Overflowing Allow Wrapping But No Overflow Allow a really long word to be broken if necessary fit in available width

Read More

Multiple background images

Multiple horizontal background images with transparent png’s Multiple vertical background images with transparent png’s Doing this won’t work because the repeat-y will cause the middle image to fill the whole height, no matter where it is positioned initially: Solution A nice solution is to push the repeating background into a pseudo element positioned off of […]

Read More