MySQL new library and notepad++

11,073

Solution 1

Using Notepad++, highlight mysqli, then

  1. open note pad select settings
  2. select style configurator
  3. in language select php
  4. in style select WORD
  5. in user-defined key words enter the keyword you want highlighted.
    make sure there is a space after false (first item.)
    Below is a list (It's the ones I use.)
  6. Save and close.

True false
mysqli_affected_rows
mysqli_autocommit
mysqli_change_user
mysqli_character_set_name
mysqli_close
mysqli_commit
mysqli_connect_errno
mysqli_connect_error
mysqli_connect
mysqli_data_seek
mysqli_debug
mysqli_dump_debug_info
mysqli_errno
mysqli_error_list
mysqli_error
mysqli_fetch_all
mysqli_fetch_array
mysqli_fetch_assoc
mysqli_fetch_field_direct
mysqli_fetch_field
mysqli_fetch_fields
mysqli_fetch_lengths
mysqli_fetch_object
mysqli_fetch_row
mysqli_field_count
mysqli_field_seek
mysqli_field_tell
mysqli_free_result
mysqli_get_charset
mysqli_get_client_info
mysqli_get_client_stats
mysqli_get_client_version
mysqli_get_connection_stats
mysqli_get_host_info
mysqli_get_proto_info
mysqli_get_server_info
mysqli_get_server_version
mysqli_info
mysqli_init
mysqli_insert_id
mysql_kill
mysqli_more_results
mysqli_multi_query
mysqli_next_result
mysqli_num_fields
mysqli_num_rows
mysqli_options
mysqli_ping
mysqli_prepare
mysqli_query
mysqli_real_connect
mysqli_real_escape_string
mysqli_real_query
mysqli_reap_async_query
mysqli_refresh
mysqli_rollback
mysqli_select_db
mysqli_set_charset
mysqli_set_local_infile_default
mysqli_set_local_infile_handler
mysqli_sqlstate
mysqli_ssl_set
mysqli_stat
mysqli_stmt_init
mysqli_store_result
mysqli_thread_id
mysqli_thread_safe
mysqli_use_result
mysqli_warning_count

Solution 2

I can't answer number 1 for you because I don't know the details.

2: I don't know why it's not included by default, but you can add it manually.
Go to settings->style configurator and choose php under language. Choose WORD under style.
In the box called "User-defined keywords" Add all the mysqli_* functions you use. They'll be highlighted from now on.

3: For now, they will work. It was deprecated in 5.5, which means it will throw a warning when you use it. Eventually, it will be completely removed. Still, switch over to mysqli so nothing breaks when you upgrade.

Share:
11,073
imulsion
Author by

imulsion

Proud owner of 2,000 rep. Thank you stackoverflow for everything you have done for me. Have lied about my name and age for quite a while to get the "autobiographer" badge. Also, my website is not called "N/A", I don't actually have one. At last, I have a gold badge.

Updated on June 13, 2022

Comments

  • imulsion
    imulsion almost 2 years

    As I understand it, the normal mysql mysql.* method library has been superseded somewhat by the library mysqli.*. Essentially, my understanding is that the new library uses all the old methods just with the letter "i" tagged onto the end of the method name. Three questions:

    1. Why have MySQL updated this library and what new features does it contain?
    2. For users of Notepad++, the language of choice can be selected from a drop-down menu, which then highlights the code much like an IDE does, for instance methods are coloured blue and are in bold font. When I first wrote some MySQL code, I used the old library methods, not being aware of the advancement. When I converted it to the new library methods, the blue/bold highlighting disappeared and returned to normal font. When I deleted the "i" in the method name, it became highlighted again. Why does Notepad++ not recognize the new methods?
    3. Are the new methods a requirement (i.e. Will the old methods still work in PHP)?